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
//Heavily edited by myself. Originally from https://gist.github.com/238834/e2d0a6ca427fdf02d55ced1fdfb8ed37b2cd8a62 | |
(function(){ | |
plugin.onMessageInsertion = function(event){ | |
var lastRow = Talker.getLastRow(); | |
if (!lastRow.length) return; | |
var lastP = lastRow.find('div.line'); | |
if (!lastP.length) return; | |
if (lastP.find('iframe.talkerapp-plugin-gist-embed').length) return; | |
var gistLink = lastP.find('a[href^=https://gist.github.com]:first'); |
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
######################################################################## | |
### Rakefile for encrypted passwords | |
######################################################################## | |
# | |
# Here's a little Rakefile to manage your encrypted password file! It's | |
# really easy to use: | |
# | |
# 1) put the email addresses of the keys you want in AUTHORIZED_USERS | |
# 2) create a passwords.txt (and ignore it in your SCM) | |
# 3) run `rake passwords:encrypt` |
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
# A sample Guardfile | |
# More info at http://github.com/guard/guard#readme | |
guard 'livereload', :api_version => '1.5' do | |
watch(%r{app/.+\.(rb|erb|haml|js|sass)$}) | |
watch(%r{app/helpers/.+\.rb$}) | |
watch(%r{public/.+\.(sass|css|js|html)$}) | |
watch(%r{config/locales/.+\.yml$}) | |
end |
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
$$('form input[name=authenticity_token]').select(function(i) {return i.value != $$('meta[name=csrf-token]')[0].readAttribute('content');}).map(function(i) {var form = i.up('form'); form.setStyle({border: '2px solid red'}); return form;}); |
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
Capybara::Driver::Selenium.class_eval do | |
class << self | |
alias old_driver driver | |
if false | |
# override firefox driver in favor of selenium | |
def driver | |
@driver ||= begin | |
driver = Selenium::WebDriver.for :chrome | |
at_exit { driver.quit } | |
driver |
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
############################################# | |
$ nginx -V | |
nginx version: nginx/0.8.53 | |
TLS SNI support enabled | |
configure arguments: --prefix=/usr/local/Cellar/nginx/0.8.53 --with-http_ssl_module --with-pcre --conf-path=/usr/local/etc/nginx/nginx.conf --pid-path=/usr/local/var/run/nginx.pid --lock-path=/usr/local/var/nginx/nginx.lock | |
############################################# | |
$ sudo lsof -Pni -a -c nginx | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
nginx 8509 root 9u IPv4 0x08bfd6b0 0t0 TCP *:8080 (LISTEN) |
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
from: | |
object.log { | |
puts | |
} | |
to: | |
object.log { puts } |
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
#!/custom/ree/bin/ruby | |
# USAGE: | |
# | |
# echo "|/path/to/core_helper.rb %p %s %u %g" > /proc/sys/kernel/core_pattern | |
# | |
require 'etc' | |
require 'net/smtp' |
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
# | |
stty erase | |
# Setting the path for MacPorts. | |
export PATH=/opt/local/bin:/opt/local/sbin:/opt/usr/bin:$PATH | |
# export PATH=/opt/local/lib/postgresql82/bin:/opt/local/lib/mysql5/bin:/WebKit/WebKitTools/Scripts:$PATH | |
export PATH=~/Development/bin:$PATH | |
export PATH=$PATH:"/Library/Application Support/VMware Fusion/" | |
# export PATH=$PATH:"/opt/android-sdk-mac_x86-1.5_r2/tools" | |
export PATH=$PATH:"/opt/PalmSDK/Current/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
This is an example of using RVM's Project .rvmrc file | |
to have it automatically bootstrap your environment, including bundler. | |
This could be further expanded to do anything you require :) | |
The important thing to remember is that the purpose of these files is | |
to allow you to very easily have your 'project context' (aka 'environment') | |
loaded automatically for you when you enter the project in the shell (cd). | |
You can generate the .rvmrc file below by running: |