Skip to content

Instantly share code, notes, and snippets.

@rjacoby
rjacoby / gist:46f7ceb900f97b0cc8f4
Created July 31, 2014 17:43
Facebook STOP! console code
__d("Chromedome", ["fbt"], function(a, b, c, d, e, f, g) {
f.start = function(h) {
if (h.off || top !== window ||!/(^|\.)facebook\.com$/.test(document.domain))
return;
var i = h.stop || "Stop!", j = h.text || "This is a browser feature intended for developers. If someone told you to copy-paste something here to enable a Facebook feature or \"hack\" someone's account, it is a scam and will give them access to your Facebook account.", k = h.more || g._("For more information, see {url}.", [g.param("url", 'https://www.facebook.com/selfxss')]);
if ((window.chrome || window.safari)&&!h.textonly) {
var l = 'font-family:helvetica; font-size:20px; ';
[[i, h.c1 || l + 'font-size:50px; font-weight:bold; ' + 'color:red; -webkit-text-stroke:1px black;'], [j, h.c2 || l], [k, h.c3 || l], ['', '']].map(function(r) {
setTimeout(console.log.bind(console, '\n%c' + r[0], r[1]));
});
➜ ~ curl https://registry.npmjs.org/-/all --silent --write-out "size_download=%{size_download}\n" --output /dev/null
size_download=39077657
➜ ~ curl https://registry.npmjs.org/-/all --silent -H "Accept-Encoding: gzip,deflate" --write-out "size_download=%{size_download}\n" --output /dev/null
size_download=39077698
➜ ~ curl https://registry.npmjs.org/-/all --silent --http1.0 -H "Accept-Encoding: gzip,deflate" --write-out "size_download=%{size_download}\n" --output /dev/null
size_download=39077996
➜ ~ ls -lh npm_all.json
-rw-r--r-- 1 rafij MAIN\Domain Users 37M May 30 13:49 npm_all.json
➜ ~ gzip npm_all.json
➜ PlayButtoniTunesPatch sudo ./Patch.command
Confirmed that the script is running as root (uid 0).
-------------------------- Play Button iTunes Patch --------------------------
This program will patch the Remote Control Daemon to prevent it from starting
iTunes whenever you press the play button on the keyboard or an external
remote control. This will only prevent iTunes from starting, all other
functions (like play/pause while iTunes is _running_) will continue to work
as before.
2013-08-19T03:23:00.502888+00:00 app[web.2]: WARNING: This import is deprecated. Use 'compass/typography/lists/inline-block-list' instead.
2013-08-19T03:23:00.502888+00:00 app[web.2]: on line 1 of /app/vendor/bundle/ruby/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/lists/_inline-block-list.scss
2013-08-19T03:23:00.502888+00:00 app[web.2]: from line 65 of /app/app/assets/stylesheets/application-ie8.css.scss
2013-08-19T03:23:00.502888+00:00 app[web.2]:
@rjacoby
rjacoby / gist:6223116
Created August 13, 2013 16:48
Convoluted&fragile precompile&deploy script
namespace :deploy do
desc 'Deploy a particular tag'
task :tag, [:tag_name, :destination_remote] do |t, args|
main_branch = %x[git symbolic-ref HEAD 2>/dev/null].split('/').last.strip
tag_name = args[:tag_name]
destination_remote = args[:destination_remote]
destination_env = destination_remote.split('-').last
cached_assets = "tmp/assets-#{destination_env}"
@rjacoby
rjacoby / gist:665091
Created November 6, 2010 01:03
.gemrc
---
:sources:
- http://rubygems.org
- http://gems.github.com
:backtrace: false
:benchmark: false
:verbose: true
:update_sources: true
:bulk_threshold: 1000
gem: --no-ri --no-rdoc
@rjacoby
rjacoby / gist:665090
Created November 6, 2010 01:02
.irbrc
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize
require 'hirb'
#Hirb::View.enable
Hirb.enable :pager=>false
@rjacoby
rjacoby / gist:665089
Created November 6, 2010 01:00
Useful additions to .profile for bash
export EDITOR='mate -w'
export LESSEDIT='mate -l %lm %f'
alias cdf='eval `osascript /Applications/Utilities/OpenTerminal.app/Contents/Resources/Scripts/OpenTerminal.scpt `'
alias reshell='source ~/.profile'
alias r3="rvm use ruby-1.9.2@rails3"
alias r="rails"