⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
#!/bin/bash | |
# Load a db from files in a directory | |
# test for minimum of command args | |
if [ ! -n "$1" -o ! -n "$2" -o ! -n "$3" ] | |
then | |
echo "Usage: `basename $0` dbname user password" | |
exit -1 |
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
""" | |
Backbone.js handler and mongodb based handler for Tornado. | |
`BackboneHandler` handles the sync protocol for Backbone.js. Inherit | |
from the class and implement the model methods: | |
* create_model | |
* update_model | |
* get_model | |
* delete_model | |
* get_collection |
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
{% if is_paginated %} | |
<div class="pagination"> | |
<ul> | |
{% if page_obj.has_previous %} | |
<li><a href="?page={{ page_obj.previous_page_number }}"> | |
{% else %} | |
<li class="disabled"><a href="#"> | |
{% endif %} | |
Prev</a></li> | |
{% for p in page_obj.paginator.page_range %} |
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
# This is the syntax to add a component to $PATH in the fish shell | |
set -gx PATH /usr/local/mysql/bin/ $PATH | |
# Note the space between the new component and the existing $PATH variable. |
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
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
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
# jump straight to open finder window. Remember fish uses parentheses instead of backticks. | |
function cdf | |
set -l target (osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)') | |
if test $target != "" | |
cd "$target" | |
pwd | |
else | |
echo 'No Finder window found' >&2 | |
end |
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
#!/bin/bash | |
# setup | |
suffix=`date +%Y%m%d` | |
dest=/home/wide/dbs | |
cmd='/usr/bin/mysqldump' | |
user='backuper' | |
password='jfhiue839' | |
#databases="mysql test" |
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
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user | |
# Then relaunch finder or reboot machine |
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
adduser --system --no-create-home --group --shell /bin/false --disabled-password --disabled-login redis |