<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>kvz.io - Latest Comments</title><link>http://kvzio.disqus.com/</link><description>A blog on code, distributed systems, and bootstrapping Transloadit</description><atom:link href="https://kvzio.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 15 Aug 2023 06:17:59 -0000</lastBuildDate><item><title>Re: Create Youtube-like IDs with PHP/Python/Javascript/Java/SQL</title><link>http://kvz.io/blog/2009/06/10/create-short-ids-with-php-like-youtube-or-tinyurl/#comment-6255239692</link><description>&lt;p&gt;In the older Python implementation( by wessie)&lt;/p&gt;&lt;p&gt;`ALPHABET = "bcdfghjklmnpqrstvwxyz0123456789BCDFGHJKLMNPQRSTVWXYZ"`&lt;br&gt;is wrong `a` and `A` seem missing.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Huge</dc:creator><pubDate>Tue, 15 Aug 2023 06:17:59 -0000</pubDate></item><item><title>Re: Setting up macOS for JS development</title><link>http://kvz.io/blog/2022/07/26/macos-install/#comment-6097198888</link><description>&lt;p&gt;Hey genius, I thought you'd stand by your big words and switched to Linux for good? You're a wicky-wacky flippy-floppy type, aren't ya?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Manfred Deutschmann</dc:creator><pubDate>Mon, 23 Jan 2023 11:03:30 -0000</pubDate></item><item><title>Re: And Now for Something Completely Different (NL)</title><link>http://kvz.io/blog/2019/12/11/something-completely-different/#comment-6058551011</link><description>&lt;p&gt;maybe it's really fast?!? 🥴😆&lt;br&gt;&lt;b&gt;l.KONGBIAN.COM.CN/D7503XW&lt;/b&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Geoff S</dc:creator><pubDate>Tue, 06 Dec 2022 04:48:36 -0000</pubDate></item><item><title>Re: Bash best practices - Kevin van Zonneveld</title><link>http://kvz.io/blog/2013/11/21/bash-best-practices/#comment-5963673723</link><description>&lt;p&gt;I find that is you use function in your code this helps alot to help in debugging your code&lt;br&gt;export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'&lt;/p&gt;&lt;p&gt;This will print the the function name and the line number of the the script. &lt;br&gt;This really helps if you use lots of functions in your code&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Fransen</dc:creator><pubDate>Mon, 29 Aug 2022 14:04:46 -0000</pubDate></item><item><title>Re: Convert anything to Tree Structures in PHP</title><link>http://kvz.io/blog/2007/10/03/convert-anything-to-tree-structures-in-php/#comment-5934088930</link><description>&lt;p&gt;php has this stuff since 5.3 which can be used in similar way:&lt;br&gt;$tree = new RecursiveTreeIterator(new RecursiveDirectoryIterator(__DIR__, RecursiveDirectoryIterator::SKIP_DOTS));&lt;br&gt;Good job anyway&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CHERNOMOR</dc:creator><pubDate>Sun, 31 Jul 2022 17:19:53 -0000</pubDate></item><item><title>Re: Introducing ratestate</title><link>http://kvz.io/blog/2014/12/21/introducing-ratestate/#comment-5886381275</link><description>&lt;p&gt;&lt;a href="https://lisanetwork.com" rel="nofollow noopener" target="_blank" title="https://lisanetwork.com"&gt;Helpful &lt;/a&gt;Article.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pratiksha</dc:creator><pubDate>Mon, 13 Jun 2022 01:52:05 -0000</pubDate></item><item><title>Re: Create Youtube-like IDs with PHP/Python/Javascript/Java/SQL</title><link>http://kvz.io/blog/2009/06/10/create-short-ids-with-php-like-youtube-or-tinyurl/#comment-5868733132</link><description>&lt;p&gt;Bruh....&lt;br&gt;&lt;code&gt;&lt;br&gt;function generateHash(): string&lt;br&gt;    {&lt;br&gt;        $bytes = random_bytes(8);&lt;br&gt;        $base64 = base64_encode($bytes);&lt;br&gt;&lt;br&gt;        return rtrim(strtr($base64, '+/', '-_'), '=');&lt;br&gt;    }&lt;br&gt;&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ReflexShow</dc:creator><pubDate>Thu, 26 May 2022 09:20:01 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-5656516863</link><description>&lt;p&gt;I would like to know if after using the new MacBook Pro 14"/16" with M1 Pro/Max if still think the same about Linux.&lt;br&gt;I'm software engineer in c/c++ and my dev boxes are Linux but it's becoming to be enough to me trying an extra effort to things that should be just work on Linux like a clipboard!&lt;br&gt;I hotel Mac just works and is trouble free. In the dirty jard of Linux you need to spent hours if not days if your nvidia  module was updated and as result is incompatible with the new kernel version and becomes without X, recompile kernel module, patches...ohh my ...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">AM</dc:creator><pubDate>Thu, 23 Dec 2021 16:05:09 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-5612707434</link><description>&lt;p&gt;Nice, thanks for sharing!&lt;br&gt;One add, for magicmouse slow scroll:&lt;br&gt;sudo rmmod hid_magicmouse; sudo modprobe hid_magicmouse scroll-speed=45 scroll-acceleration=1&lt;br&gt;from &lt;a href="https://superuser.com/questions/226300/apple-magic-mouse-on-ubuntu-slow-scrolling" rel="nofollow noopener" target="_blank" title="https://superuser.com/questions/226300/apple-magic-mouse-on-ubuntu-slow-scrolling"&gt;https://superuser.com/quest...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tom Lobato</dc:creator><pubDate>Wed, 17 Nov 2021 23:40:46 -0000</pubDate></item><item><title>Re: Reverse a multibyte string in php - Kevin van Zonneveld</title><link>http://kvz.io/blog/2012/10/09/reverse-a-multibyte-string-in-php/#comment-5253116982</link><description>&lt;p&gt;This will break for strings containing accents or other combining marks.&lt;/p&gt;&lt;p&gt;Eg: &lt;code&gt;y̅a&lt;/code&gt; becomes &lt;code&gt;a̅y&lt;/code&gt; with this function.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sammitch</dc:creator><pubDate>Wed, 03 Feb 2021 15:54:38 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-5159612914</link><description>&lt;p&gt;Thank you! That's a great set of tips. The shortcuts are my biggest issue. I knew about Ctrl+ins etc. but it used to be possible to move the system-wide app shortcut key from Ctrl to Alt or Meta, and now I can't seem to do that anymore. If I could move it to Cmd/Meta it would free up Ctrl for the terminal. It's not just the terminal but also emacs keys that use Ctrl, so Ctrl+A is beginning of line but if Ctrl becomes the gui shortcut key then Ctrl+A becomes select-all.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">amitp</dc:creator><pubDate>Fri, 20 Nov 2020 17:49:39 -0000</pubDate></item><item><title>Re: Reverse a multibyte string in php - Kevin van Zonneveld</title><link>http://kvz.io/blog/2012/10/09/reverse-a-multibyte-string-in-php/#comment-5138429327</link><description>&lt;p&gt;This one works for me.&lt;/p&gt;&lt;p&gt;&lt;code&gt;function string_reverse ($string) {&lt;br&gt;   /// Multibyte String Reverse&lt;br&gt;   return \implode (null, \array_reverse (\preg_split ('//u', $string, null, PREG_SPLIT_NO_EMPTY)));&lt;br&gt;}&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tux Lector</dc:creator><pubDate>Wed, 04 Nov 2020 21:06:15 -0000</pubDate></item><item><title>Re: Bash best practices - Kevin van Zonneveld</title><link>http://kvz.io/blog/2013/11/21/bash-best-practices/#comment-5032956551</link><description>&lt;p&gt;__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &amp;amp;&amp;amp; pwd)"&lt;br&gt;__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"&lt;br&gt;__base="$(basename ${__file} .sh)"&lt;/p&gt;&lt;p&gt;This code should be replaced with the following.  These suggestions should run faster and don't involve spining up subshells for no reason.  The usual way to write variable names is with majescule, not miniscule, characters.  You might also try using ${0} in place of ${BASH_SOURCE[0]}.  Lastly you will need to define or typeset your variables since you are using the "nounset" option.&lt;/p&gt;&lt;p&gt;__DIR="${BASH_SOURCE[0]%/*}"&lt;br&gt;__BASE="${BASH_SOURCE[0]##*/}"&lt;br&gt;__FILE="${BASH_SOURCE[0]}"&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous314159265358979323</dc:creator><pubDate>Sun, 16 Aug 2020 14:52:48 -0000</pubDate></item><item><title>Re: Bash best practices - Kevin van Zonneveld</title><link>http://kvz.io/blog/2013/11/21/bash-best-practices/#comment-5031663549</link><description>&lt;p&gt;It really is a lot easier to read:&lt;/p&gt;&lt;p&gt;&lt;code&gt;myfile=`ls -l | grep `date``&lt;br&gt;myfile=$(ls -l | grep $(date))&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Keith Irwin</dc:creator><pubDate>Sat, 15 Aug 2020 11:59:14 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-4970213329</link><description>&lt;p&gt;some time ago i got a lecture about ubuntu and i was very interested in learning it more. This site helps me to understand ubuntu well. &lt;br&gt;Please visit our article in link &lt;a href="#" rel="nofollow noopener" target="_blank" title="#"&gt;http://news.unair.ac.id/en/2016/05/19/faculty-of-vocations-holds-database-training-program-to-produce-competent-teachers-and-students/suasana-training-of-trainer-database-programming-with-plsql-di-ruang-lab-komputer-lp3-unair-2/&lt;/a&gt;&lt;br&gt;Thank You&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stefani Via</dc:creator><pubDate>Sat, 27 Jun 2020 02:45:05 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-4958144425</link><description>&lt;p&gt;Hey there, I'm the guy who made the Jetbrains toolbox suggestion. I've written a similar post to yours about my current linux desktop setup: &lt;a href="https://mxschumacher.xyz/mylinuxsetup.html" rel="nofollow noopener" target="_blank" title="https://mxschumacher.xyz/mylinuxsetup.html"&gt;https://mxschumacher.xyz/my...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MaxSchumacher</dc:creator><pubDate>Wed, 17 Jun 2020 17:54:08 -0000</pubDate></item><item><title>Re: Improve MySQL Insert Performance - Kevin van Zonneveld</title><link>http://kvz.io/blog/2009/03/31/improve-mysql-insert-performance/#comment-4925851755</link><description>&lt;p&gt;Muito obrigado! Funcionou perfeito, so faltou mensionar que na configuração my.ini tem colocar vazio secure_file_priv = ''. Mas processo demorava minutos, faz em 3 segundos.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rafael</dc:creator><pubDate>Sun, 24 May 2020 10:43:09 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-4822385576</link><description>&lt;p&gt;I select my keyboard layout as one of the first steps of Ubuntu's installation. So for me, it is out of the box. Every time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nicolay Giraldo</dc:creator><pubDate>Thu, 05 Mar 2020 22:35:40 -0000</pubDate></item><item><title>Re: Convert all Tables to InnoDB - Kevin van Zonneveld</title><link>http://kvz.io/blog/2010/04/27/convert-all-tables-to-innodb-in-one-go/#comment-4797688407</link><description>&lt;p&gt;Be careful using above ideas running them on a MariaDb Galera cluster. After some tables are converted the cluster stops working. Better to de-activate all running nodes. Only start the Galera bootstrap server, convert the tables. Restart the bootstrap server and add again the nodes one by one.&lt;/p&gt;&lt;p&gt;This way the MariaDb Galera cluster is having some time to get all databases/tables in sync again.&lt;/p&gt;&lt;p&gt;Enjoy converting. I tried it myself and it works awesome!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pieter Dings</dc:creator><pubDate>Sat, 15 Feb 2020 22:08:33 -0000</pubDate></item><item><title>Re: Speedup your website with Cache_Lite</title><link>http://kvz.io/blog/2007/08/01/speedup-your-website-with-cache-lite/#comment-4797662429</link><description>&lt;p&gt;Worked out very well. Thanks a lot sharing this idea. Used it on many of my websites. Example : &lt;a href="https://TinyTinyRss.com/" rel="nofollow noopener" target="_blank" title="https://TinyTinyRss.com/"&gt;https://TinyTinyRss.com/&lt;/a&gt; [Info about using TTRss Web Rss Reader and free client usage]&lt;/p&gt;&lt;p&gt;Enjoy your weekend!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pieter Dings</dc:creator><pubDate>Sat, 15 Feb 2020 21:27:11 -0000</pubDate></item><item><title>Re: Convert anything to Tree Structures in PHP</title><link>http://kvz.io/blog/2007/10/03/convert-anything-to-tree-structures-in-php/#comment-4754876246</link><description>&lt;p&gt;Wooow, very nice! Thanks for you work!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alliline</dc:creator><pubDate>Sun, 12 Jan 2020 18:12:35 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-4739545109</link><description>&lt;p&gt;Thanks for sharing, sounds like a good setup you got going!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kev van Zonneveld</dc:creator><pubDate>Mon, 30 Dec 2019 08:39:04 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-4739544516</link><description>&lt;p&gt;Thanks for the kind words and also for the suggestion! I hadn't heard of it yet to be honest, but perhaps this is an Ubuntu default as of Cosmic and what caused me to say it got significantly better afterwards (?)&lt;/p&gt;&lt;p&gt;&lt;code&gt;dconf read  /org/gnome/settings-daemon/plugins/xsettings/antialiasing&lt;br&gt;'rgba'&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kev van Zonneveld</dc:creator><pubDate>Mon, 30 Dec 2019 08:38:13 -0000</pubDate></item><item><title>Re: Going from macOS to Ubuntu</title><link>http://kvz.io/blog/2019/10/30/tobuntu/#comment-4726317156</link><description>&lt;p&gt;Most of the issues you describe with copy paste has been solved for years... but there is a bug in 19.10 that causes issues with copy paste. It should be solved with the next update of Mutter.&lt;/p&gt;&lt;p&gt;Also by default you can copy paste to the terminal with ctrl+shift+c ctrl+shift+v. That, to me at least feels more easier then ctrl/shift+insert.&lt;/p&gt;&lt;p&gt;If you keyboard has ´ then you you can simply type ´e to write é.&lt;/p&gt;&lt;p&gt;Hope some of that helps.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">AJenbo</dc:creator><pubDate>Mon, 16 Dec 2019 12:30:40 -0000</pubDate></item><item><title>Re: Convert anything to Tree Structures in PHP</title><link>http://kvz.io/blog/2007/10/03/convert-anything-to-tree-structures-in-php/#comment-4714167054</link><description>&lt;p&gt;Is there a way to create a nested model set from it?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sunil Prajapati</dc:creator><pubDate>Fri, 06 Dec 2019 07:08:24 -0000</pubDate></item></channel></rss>