This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am basilio on github. | |
* I am basilio (https://keybase.io/basilio) on keybase. | |
* I have a public key whose fingerprint is E592 2A38 42D4 C2F3 1A0C 61BC 3A49 9316 C657 9905 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make global replaces in multiples sql files, using sed | |
# Tested on Mac OSX | |
for x in *.sql; do sed -i '' 's/currentText/newText/g' ${x//.sql}.sql; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compile less with inotify | |
## Detect all changes on every files in the less folder | |
## Compile the master less file, where you call all less files | |
## Update the css output file | |
/path/to/less/ IN_MODIFY lessc /path/to/less/compiler.less /path/to/css/style.css | |
# Minified | |
/path/to/less/ IN_MODIFY lessc --yui-compress /path/to/less/compiler.less /path/to/css/style.min.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a watermark image (watermark.png) and place in folder | |
// Run this script on command line. It generates an image-wm.png for each image.png | |
for x in *.png; do composite -gravity Center watermark.png $x ${x//.png}-wm.png; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for x in `ls *.*`; do `convert -type Grayscale $x $x`; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New Document | |
http://docs.google.com/document/create?hl=en | |
New Spreadsheet | |
http://spreadsheets.google.com/ccc?new&hl=en | |
New Presentation | |
https://docs.google.com/present/create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sort bookmarks by rating | |
*/ | |
function av_sort_bookmarks_by_rating($links){ | |
foreach($links as $item) $new_list_links[$item->link_rating] = $item; | |
sort($new_list_links); | |
return $new_list_links; | |
} | |
add_filter("get_bookmarks", "av_sort_bookmarks_by_rating"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Link to toggle element width jQuery | |
// HTML | |
<a href="#element" title="link to some text" class="toggle">link to some text</a> | |
<div id="element" style="display: none;">Content to show</div> | |
// JS | |
jQuery(document).ready(function(){ | |
$('.toggle').click(function(){ | |
$(this.hash).toggle(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.png; do convert $i -resize 50x50 $i.jpg; done |