snippet - Arch Linux: Use Autocomplete in Command Line
31 Aug, 2018
In default you can use extremely limited autocomplete in bash command line. For an example you can't use autocomplete after you type "sudo". When installing this package all the extra autocompletes...
snippet - Defining class variables in Python
4 Sep, 2018
You can define class variables multiple ways in Python, but they also work differently. Underscore is used for "private" or "protected" variables, altough there are no such definitions in Python....
snippet - MySQL simple update query example
15 Aug, 2018
There are actually two ways of updating in MySQL. This example uses the simpler way. Other way is to define columns and corresponding values sepparately.
snippet - Number to words in PHP
24 Jul, 2018
Helper function for converting numbers to words. There is same function available in PHPs NumberFormatter class, but using it is not always possible, since it's not enabled by default.
snippet - Tables content to exclude on DB export in Drupal 7
24 Jul, 2018
Exclude content from these tables, to get clean db backup(backup_migrate module usage). You can even use git to store your database, when you don't export cache tables.
snippet - Migrate Field Collection in Drupal 7
25 Jun, 2018
You can use migrate to import field collections. It has full support. You just need to define the host entity, where you have defined the field collection.
snippet - Explode multiple delimiters PHP
4 Jan, 2016
To explode multiple delimiters PHP you have to use regular expression. Add your delimiters in the parentheses separated by pipe. You might have to escape your characters if they have meaning in PCRE...
snippet - ffmpeg2.8: installing x265 (2.8-1) breaks dependency 'libx265.so=151-64'
2 Jun, 2018
error: failed to prepare transaction (could not satisfy dependencies) ffmpeg2.8: installing x265 (2.8-1) breaks dependency 'libx265.so=151-64'
snippet - Load a file by uri in Drupal 7
16 May, 2018
This snippet shows you how to load a file by uri. Basically this option is available with file_load_mulitple only.
snippet - MySQL: insert/update multiple rows with a single query
16 May, 2018
To insert multiple rows with a single query you can use regular insert with multiple value rows. You can also use update if you have primary key set.