/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/\LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local\-domain system -domain user
⌃ ⌥ CLick on Finder icon in the Dock
#!/usr/bin/env ruby | |
# .git/hooks/pre-commit | |
# Git pre-commit hook that catches errors that I commonly make. | |
# | |
# To intentionally ignore the hook (i.e., when adding an alert call), commit | |
# from the command line with "--no-verify" | |
# | |
# Loosely based on Henrik Nyh's <http://henrik.nyh.se> work (2011-10-08) | |
# under the MIT License. |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 12 | head -n 1 |
for i in *; do cd $i && git pull && cd ..; done |
module StoreController | |
@@controllers = Hash.new | |
Finalizer = lambda { |id| | |
@@controllers.delete id | |
} | |
class << self | |
def set_controller(controller) | |
unless @@controllers.has_key?(Thread.current.object_id) |
# Split string by '|' | |
IFS='|' read -a array <<< "strig" | |
# Download | |
for element in "${array[@]}"; do wget "$element"; done |
# /etc/my.cnf | |
[mysqld] | |
sort_buffer_size = 512M | |
sort_buffer = 512M | |
innodb_file_per_table | |
[mysql] | |
default-character-set = utf8 |
// HTML special characters | |
$(document).ready(function() { | |
CKEDITOR.on('instanceReady', function(){ | |
// liquidize_template é o nome da campo para o CKEditor | |
CKEDITOR.instances.liquidize_template.on('mode', function(ev) { | |
if (ev.editor.mode == 'source') { | |
var str = ev.editor.getData(); | |
str = str.replace(/&/g, "&") | |
.replace(/>/g, ">") | |
.replace(/</g, "<") |
ul.token-input-list-bootstrap { | |
cursor: text; | |
overflow: hidden; | |
height: auto !important; | |
margin: 0; | |
list-style-type: none; | |
border: 1px solid #cccccc; } | |
ul.token-input-list-bootstrap { | |
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); |
# normal | |
class Library | |
attr_accessor :games | |
def each(&block) | |
games.each(&block) | |
end | |
def map(&block) | |
games.map(&block) |