This file contains hidden or 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
<?php | |
$start_dir = 'whatever'; // Starting directory name no trailing slashes. | |
$perms['file'] = 0644; // chmod value for files don't enclose value in quotes. | |
$perms['folder'] = 0755; // chmod value for folders don't enclose value in quotes. | |
function chmod_file_folder($dir) { | |
global $perms; | |
$dh=@opendir($dir); |
This file contains hidden or 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
# Install dnsmasq | |
$ brew install dnsmasq | |
# Copy the default configuration file. | |
$ cp $(brew list dnsmasq | grep /dnsmasq.conf.example$) /usr/local/etc/dnsmasq.conf | |
# Copy the daemon configuration file into place. | |
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/ | |
# Start Dnsmasq automatically. |
This file contains hidden or 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
/* @2x Images (Pixel Ratio of 1.25+) */ | |
@mixin image-2x($image, $width, $height) { | |
@media only screen and (min--moz-device-pixel-ratio: 5/4), | |
only screen and (-o-min-device-pixel-ratio: 5/4), | |
only screen and (-webkit-min-device-pixel-ratio: 1.25), | |
only screen and (min-device-pixel-ratio: 1.25), | |
only screen and (min-resolution: 1.25dppx) { | |
background-image: url($image); | |
background-size: $width $height; | |
} |
This file contains hidden or 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
# | |
# http://naleid.com/blog/2009/06/18/poor-mans-top-for-mysql | |
# | |
watch -n 5 --differences "mysql -u root -p -e 'show processlist'" |
This file contains hidden or 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
<?php | |
/* | |
// recipients array example | |
$recipients = array( | |
array('address'=> | |
array( | |
'email' => '[email protected]', | |
'name'=>'Carlos Cabral' | |
) |
This file contains hidden or 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
browser-sync start --proxy "ds.dev" --files "dist/css/*.css" --host 192.168.200.2 |
This file contains hidden or 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
diff <(sort -u <(dig +nottlid +noall +answer @ns.myfirstserver.com example.com ANY) ) <(sort -u <(dig +nottlid +noall +answer @ns.mysecondserver.com example.com ANY) ) |
This file contains hidden or 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
@mixin valid-quantity($quantity) { | |
@if type-of($quantity) != 'number' { | |
@error 'The "quantity" parameter must be a number!'; | |
} | |
@if not(unitless($quantity)) { | |
@error 'The "quantity" parameter must not have a unit!'; | |
} | |
@if $quantity < 0 { | |
@error 'The "quantity" parameter must be at least 0!'; | |
} |
This file contains hidden or 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
KEYBINDINGS | |
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings | |
are: | |
F2 - Create a new window | |
F3 - Move to previous window | |
F4 - Move to next window |
This file contains hidden or 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 -sSL https://get.docker.com/ | sh | |
sudo docker run --name mysql-57-container -p 127.0.0.1:3310:3306 -e MYSQL_ROOT_PASSWORD=rootpassword -d mysql:5.7 | |
mysql -u root -p --host=127.0.0.1 --port=3310 |