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
/** | |
* Data on today, yesterday, and the current month. | |
*/ | |
$date = new DateTime(); | |
$filter['todayText'] = $date->format('l'); | |
$filter['monthText'] = $date->format('F'); | |
$date->modify('yesterday'); | |
$filter['yesterdayText'] = $date->format('l'); |
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
$ xcode-select --install | |
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
$ brew tap homebrew/dupes | |
$ brew tap homebrew/versions | |
$ brew tap homebrew/homebrew-php | |
$ brew install php56 |
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
#!/usr/bin/env php | |
<?php | |
/** | |
* List of domains on the level where your CNAME would exist | |
*/ | |
$domains = [ | |
]; | |
echo PHP_EOL; |
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
var x = document.createElement('script'); | |
x.src = '/javascripts/prototype.js'; | |
document.getElementsByTagName("head")[0].appendChild(x); | |
var x = document.createElement('script'); | |
x.src = '/javascripts/jquery.js'; | |
document.getElementsByTagName("head")[0].appendChild(x); | |
var x = document.createElement('script'); | |
x.src = '/javascripts/jquery_ui.js'; |
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
Walk all commits back to a certain commit | |
git revert --no-commit 0766c053..HEAD | |
git commit | |
Comment from author (Yarin): |
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
# Die Supervisor processes that didn't get taken down by your guardian!! | |
ps -ef | grep gearman | grep -v grep | awk '{print $2}' | xargs kill -9 |
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
Error: | |
Failed to mount folders in Linux guest. This is usually because | |
the "vboxsf" file system is not available. Please verify that | |
the guest additions are properly installed in the guest and | |
can work properly. The command attempted was: | |
mount -t vboxsf -o uid=`id -u root`,gid=`getent group vagrant | cut -d: -f3` tmp_vagrant-puppet-3_manifests /tmp/vagrant-puppet-3/manifests | |
mount -t vboxsf -o uid=`id -u root`,gid=`id -g vagrant` tmp_vagrant-puppet-3_manifests /tmp/vagrant-puppet-3/manifests |
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
# Aliases | |
alias vup="vagrant up" | |
alias vh="vagrant halt" | |
alias vs="vagrant suspend" | |
alias vr="vagrant resume" | |
alias vrl="vagrant reload" | |
alias vssh="vagrant ssh" | |
alias vst="vagrant status" | |
alias vp="vagrant provision" | |
alias vdstr="vagrant destroy" |
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
// Find the third td of each tr and see if the IP starts with X, if so lets check the box for removal | |
$("table.ACCtable2 tr td:nth-child(3)").each(function() { | |
$ipNode = $(this); | |
if ($ipNode.text().indexOf(' XXX.XXX.XXX.') >= 0) { | |
$ipNode.prev().prev().children('input').prop('checked', true); | |
} | |
}); |
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
Reset Root Mysql on Ubuntu | |
sudo dpkg-reconfigure mysql-server-5.1 |