サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Wikipedia
kvz.io
This project now has its own homepage at bash3boilerplate.sh. I recently tweeted a few best practices that I picked up over the years and got some good feedback. I decided to write them all down in a blogpost. Here goes Use long options (logger --priority vs logger -p). If you're on cli, abbreviations make sense for efficiency. but when you're writing reusable scripts a few extra keystrokes will p
Unfortunately the Linux DNS resolver has no direct support for detecting and doing failovers for DNS servers. It keeps feeding requests to your primary resolving nameserver, waits for a configured timeout, attempts again, and only then tries the second nameserver. This typically means nearly 30s delay for all request as long as your primary nameserver is unreachable. It doesn't learn to directly t
Quick tip. If you lose your Vagrant mounts after kernel upgrades in your virtualbox, you'll need to reinstall your VirtualBox Guest Additions. Same is true when you upgrade Vagrant, etc. It's just a real pain and people usually avoid it by never upgrading. Or delve in once they accidentally do. But there's actually a nice & automated way of keeping your VM's guest additions in sync with virtualbox
IDs are often numbers. Unfortunately there are only 10 digits to work with, so if you have a lot of records, IDs tend to get very lengthy. For computers that's OK. But human beings like their IDs as short as possible. So how can we make IDs shorter? Well, we could borrow characters from the alphabet as have them pose as additional numbers…. Alphabet to the rescue! Other title options where How to
Sometimes MySQL needs to work hard. I've been working on an import script that fires a lot of INSERTs. Normally our database server handles 1,000 inserts / sec. That wasn't enough. So I went looking for methods to improve the speed of MySQL inserts and was finally able to increase this number to 28,000 inserts per second. Checkout my late night benchmarking adventures. I'm going to show you the re
"Simplicity is prerequisite for reliability." Edsger W. Dijkstra As our experience grows, we learn from past mistakes and discover what's truely important in reliable systems. When designing systems, simplicity is an often heard mantra, but it isn't getting applied nearly as much as spoken off. I'm guilty of this too. I think it's mainly because engineers love to, well, engineer :) and will natura
I still got sites running Apache, but all new projects are launched with Nginx. I don't need many of the features that Apache offers, and the speed gain of Nginx is just tremendous. Once you've experienced it, I doubt you'll want to go back. Update - May 2nd, 2013 The official CakePHP documentation now includes a good Nginx section. This article is hence deprecated and should only be looked at for
The core of our new project runs on Node.js. With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But how do you make it run nicely in the background like a true server? Clever chaps will have noticed you can just use the '&' like so: and send your program to the background. But: if Node ever prints something and your co
If you've got a website that's heavy on your web server, you might want to run some processes like generating thumbnails or enriching data in the background. This way it can not interfere with the user interface. Linux has a great program for this called cron. It allows tasks to be automatically run in the background at regular intervals. You could also use it to automatically create backups, sync
In PHP, sessions can keep track of authenticated in users. They are an essential building block in today's websites with big communities and a lot of user activity. Without sessions, everyone would be an anonymous visitor. In system terms, PHP sessions are little files, stored on the server's disk. But on high traffic sites, the disk I/O involved, and not being able to share sessions between multi
Everyone knows PHP can be used to create websites. But it can also be used to create desktop applications and commandline tools. And now with a class called System_Daemon, you can even create daemons using nothing but PHP. And did I mention it was easy? Update 4 Dec, 2012: Legacy Warning This class was relevant in 2009, and may still be to some people, but if you want to daemonize a php script now
Close SidebarAbout kvz.ioA blog on building: software, infra, and Transloadit Recent Articles
Or: How to convert multipage TIFF to PDF in PHP. Let's say you have a fax with multiple pages that has been stored as a TIFF and you want to convert it to PDF using PHP for digital document flow. In this article I will show you a tiff2pdf function for PHP, because it cannot be done directly with ImageMagick. Requirements php5 (I use php5-cli for running php from the command line) Imagick (native P
Since 2005 there has been an immense increase in brute force SSH attacks and though Linux is pretty secure by default, it does not stop evil programs from indefinitely trying to login with different passwords. Without proper protection your server is a sitting duck waiting for a bot to guess the right combination and hit the jackpot. But with just 2 commands we can stop that. Symptoms Here's an ex
Not everyone knows about PHP's capabilities of making SSH connections and executing remote commands, but it can be very useful. I've been using it a lot in PHP CLI applications that I run from cronjobs, but initially it was a pain to get it to work. The PHP manual on Secure Shell2 Functions is not very practicle or thorough for that matter, so I would like to share my knowledge in this how to, to
このページを最初にブックマークしてみませんか?
『A blog on building: software, infra, and a company』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く