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
# use the following to open a file with a specific program | |
function functionName() | |
{ | |
open -a program $1 | |
} | |
#usage | |
$ functionName file |
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
function fg () | |
{ | |
ffmpeg -i ./$1.f4v -r 1 -ss 00:00:00 -t 00:00:01 ./screenshots/$1.png | |
} | |
# usage | |
# fg FILENAME |
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
$ = jQuery | |
class ListView extends Backbone.View | |
el: $('body') | |
initialize: -> | |
@.render() | |
render: => | |
@el.append("<ul><li>hw</li></ul>") |
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
$ /etc/init.d/apache2 restart |
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
var formObj = casper.evaluate(function() { | |
return __utils__.getElementsByXPath('//*[@id="ff_form_main"]'); | |
}); |
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
curl \ | |
-d output_info=compiled_code \ | |
-d compilation_level=SIMPLE_OPTIMIZATIONS \ | |
-d code_url=https://github.com/path/to/javascript.js \ | |
http://closure-compiler.appspot.com/compile > file.js |
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
([ -f ~/.ssh/id_rsa.pub ] || ssh-keygen -t rsa ) && (ssh user@example.com "([ -d ~/.ssh ]||mkdir -m 700 ~/.ssh) && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub) |
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
$country_list = array( | |
"Afghanistan", | |
"Albania", | |
"Algeria", | |
"Andorra", | |
"Angola", | |
"Antigua and Barbuda", | |
"Argentina", | |
"Armenia", | |
"Australia", |
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
#Update main content | |
UPDATE wp_posts SET post_content = REPLACE ( post_content, 'http://www.helmutgranda.com/', 'https://www.helmutgranda.com/'); | |
#Update Custom fields | |
UPDATE wp_postmeta SET meta_value = REPLACE ( meta_value, 'http://www.helmutgranda.com/', 'https://www.helmutgranda.com/'); |
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
body { | |
font-family: Helvetica, Verdana | |
} | |
p { | |
padding: 7px 10px; | |
} | |
#demo { | |
border: 1px solid #999; | |
} |
OlderNewer