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
# check swap usage | |
sysctl vm.swapusage | |
# disable encrypted swap - SNOW LEOPARD | |
sudo defaults write /Library/Preferences/com.apple.virtualMemory UseEncryptedSwap -boolean no | |
# disable encrypted swap - LION | |
sudo defaults write /Library/Preferences/com.apple.virtualMemory DisableEncryptedSwap -boolean yes | |
# disable swap |
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
SELECT TABLE_NAME, table_rows, data_length, index_length, | |
round(((data_length + index_length) / 1024 / 1024),2) "Size in MB" | |
FROM information_schema.TABLES WHERE table_schema = "*DATABASE_NAME*"; |
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
export CLICOLOR=1 # colour stuff | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
alias ls='ls -GFahlrt' | |
alias updatelocate='sudo /usr/libexec/locate.updatedb' | |
export PATH="/usr/local/mysql/bin:$PATH" | |
export HISTCONTROL=ignoreboth:erasedups # no duplicate entries | |
shopt -s histappend # append history 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
Do "Show package contents" on the Eclipse.app. | |
Edit Contents/Info.plist. | |
Just above: | |
</dict> | |
</plist> | |
Place this: |
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
netstat -an | grep PG |
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
# Load RVM into a shell session *as a function* (in ~./bashrc or ~/.bash_profile) | |
echo [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" >> ~/.bashrc | |
source ~/.bashrc | |
# incase of bullshit gcc/llvm issue do for 1.9.2 version.. | |
# rvm install ruby-1.9.2 --with-gcc=clang |
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
SELECT * FROM information_schema.KEY_COLUMN_USAGE | |
WHERE REFERENCED_TABLE_NAME = 'TABLE_NAME_HERE'; |
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
object TestAkka extends App { | |
import akka.actor._ | |
class TestActor extends Actor { | |
def receive = { | |
case "hello" => println("hello world") | |
case _ => println("something else") | |
} | |
} |
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
(function() { | |
var root = this; | |
var BackboneMock = (function() { | |
if(typeof Backbone === 'undefined') { | |
throw '"Backbone" is undefined, make sure you have loaded ' + | |
'backbone.js before using this mock utility'; | |
} | |
// Override Backbone.sync | |
// because we want to mock the requests |
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Base</title> | |
<!-- Styles --> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap.css"></link> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap-responsive.css"></link> | |
OlderNewer