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
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(function() { | |
$.fn.myWidget = function(params) { | |
(function(console){ | |
if (!params.debug) console = { log: function(){} }; | |
console.log("Logging enabled!"); | |
})(console); |
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
From 95badf3776ce6a69bdff356649c7f345567c148c Mon Sep 17 00:00:00 2001 | |
From: David Kelso <david@kelso.id.au> | |
Date: Tue, 26 Apr 2011 14:44:09 -0700 | |
Subject: [PATCH] Update for 10.6. | |
--- | |
TerminalTabSwitching.xcodeproj/project.pbxproj | 4 ++-- | |
1 files changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/TerminalTabSwitching.xcodeproj/project.pbxproj b/TerminalTabSwitching.xcodeproj/project.pbxproj |
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
# Allow open-uri to follow unsafe redirects (i.e. https to http). | |
# Relevant issue: | |
# http://redmine.ruby-lang.org/issues/3719 | |
# Source here: | |
# https://github.com/ruby/ruby/blob/trunk/lib/open-uri.rb | |
module OpenURI | |
class <<self | |
alias_method :open_uri_original, :open_uri | |
alias_method :redirectable_cautious?, :redirectable? |
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/sh | |
CERT_PATH=/usr/local/share/ca-certificates/verisign.crt | |
write_certs() { | |
cat > $1 <<EOF | |
-----BEGIN CERTIFICATE----- | |
MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG | |
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz | |
cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 |
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
# Remap prefix to ctrl-s - keeps ctrl-a free for start of line | |
set -g prefix C-s | |
unbind C-b | |
# Keep consistent with screen behavior | |
bind C-s last-window | |
bind C-d detach | |
bind C-c new-window | |
bind C-r source-file $HOME/.tmux.conf |
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
#!/usr/bin/env ruby | |
require 'curb' | |
require 'yaml' | |
hosts = %w( | |
example.com | |
google.com | |
) |
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
# Put in config/initializers/handlebars.rb | |
# Add templates to app/assets/javascripts/templates/whatever.js.handlebars | |
# Then require from applicaiton.js (or any manifest) as usual. e.g. | |
# //= require_tree templates | |
class EmberHandlebars < Tilt::Template | |
def self.default_mime_type | |
'application/javascript' | |
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
App.Post = App.Model.extend App.RelationshipMixinFactory('comments'), | |
comments: DS.hasMany('comment', async: true) |
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
$ vagrant up | |
Bringing machine 'default' up with 'vmware_fusion' provider... | |
==> default: Cloning VMware VM: 'hashicorp/precise64'. This can take some time... | |
==> default: Checking if box 'hashicorp/precise64' is up to date... | |
==> default: Skipping vmnet device verification, verify_vmnet is set to false. | |
==> default: Deleting the VM... | |
/Users/zaius/.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.6/lib/vagrant-vmware-fusion/action_farm.rb:784:in `hostonly_config': undefined method `+' for nil:NilClass (NoMethodError) | |
from /Users/zaius/.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.6/lib/vagrant-vmware-fusion/action_farm.rb:706:in `block in call' | |
from /Users/zaius/.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.6/lib/vagrant-vmware-fusion/action_farm.rb:699:in `each' | |
from /Users/zaius/.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.6/lib/vagrant-vmware-fusion/action_farm.rb:699:in `call' |
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/zsh | |
function actual_path() { | |
if [ [ -z "$1" ] -a [ -d $1 ] ]; then | |
echo $(cd $1 && test `pwd` = `pwd -P`) | |
return 0 | |
else | |
return 1 | |
fi | |
} |