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
// use 'wp_before_admin_bar_render' hook to also get nodes produced by plugins. | |
add_action( 'wp_before_admin_bar_render', 'add_all_node_ids_to_toolbar' ); | |
function add_all_node_ids_to_toolbar() { | |
global $wp_admin_bar; | |
$all_toolbar_nodes = $wp_admin_bar->get_nodes(); | |
if ( $all_toolbar_nodes ) { |
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 /path -name "name" -type d | |
sudo dpkg --get-selections > list.txt | |
~/.bashrc add at the end | |
export PS1="\[\e[36;1m\]\w \$ \[\e[0m\]" | |
gtk-update-icon-cache /usr/share/icons/hicolor |
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
Problem: TinyMCE rich-text editor disables the operating system spellchecker when using Firefox or Chrome. | |
Solution: Set the TinyMCE configuration “gecko_spellcheck” to TRUE. | |
tinyMCE.init({ | |
... | |
gecko_spellcheck : 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
pbcopy < ~/.ssh/id_rsa.pub |
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
git update-index --assume-unchanged <file> | |
git update-index --no-assume-unchanged <file> |
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
Unable to locate svn binary | |
×:/usr/local/bin | |
○/Applications/Xcode.app/Contents/Developer/usr/bin/ |
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
sudo /usr/local/mysql/support-files/mysql.server start | |
sudo /usr/local/mysql/support-files/mysql.server stop | |
sudo /usr/local/mysql/support-files/mysql.server restart |
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
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib |
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
This is done by running the git update-index --assume-unchanged path/to/file.txt command. Once marking a file as such, git will completely ignore any changes on that file; they will not show up when running git status or git diff, nor will they ever be committed. | |
To make git track the file again, simply run | |
git update-index --no-assume-unchanged path/to/file.txt. | |
https://help.github.com/articles/ignoring-files |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |