Use /etc/resolver
. For instance, to change the DNS servers for irc.freenode.net
, create the file
/etc/resolver/irc.freenode.net
And set its contents to
nameserver 8.8.8.8
nameserver 8.8.4.4
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE: | |
// Uses a combination of object detection and user-agent | |
// sniffing. | |
// ---------------------------------------------------------- | |
// If you're not in IE then: | |
// ie === NaN // falsy | |
// If you're in IE then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Kambfhase | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
class ApplicationController < ActionController::Base | |
before_filter :ensure_proper_protocol | |
protected | |
def ssl_allowed_action? | |
(params[:controller] == 'users/sessions' && ['new', 'create'].include?(params[:action])) || | |
(params[:controller] == 'users/registrations' && ['new', 'create', 'edit', 'update'].include?(params[:action])) || | |
(params[:controller] == 'users/omniauth_callbacks') | |
end |
@mixin active($selector) { | |
#{$selector} { | |
color:black; | |
} | |
} | |
#my-id { | |
@include active($selector: ".my-class") | |
} |
var cat = {}; | |
/** | |
* cat.NewsBox | |
* Retrieves news from Google | |
*/ | |
cat.NewsBox = (function(){ | |
function NewsBox(searchTerm, injectFn) { | |
this.searchTerm = searchTerm; |
class UsersController < ApplicationController | |
respond_to :html, :json | |
def index | |
@json = User.all.to_gmaps4rails | |
respond_with @json | |
end | |
end |
var ALPHA = 'abcdefghijklmnopqrstuvwxyz', | |
ALPHA_UPPER = ALPHA.toUpperCase(), | |
NUMERIC = '0123456789', | |
PUNCTUATION = '-!@£$%^&*()[]{}\'"/?.>,<;:\\|~`€#', | |
UNDERSCORE = '_', | |
WHITESPACE = '\x20\t\n\r\f\v\xa0\u2028\u2029\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff'; // thanks Mathias! | |
var SHORTHAND_CC = { | |
'\\S': ALPHA + ALPHA_UPPER + NUMERIC + PUNCTUATION + UNDERSCORE, | |
'\\s': WHITESPACE, |
#!/bin/sh | |
# | |
# Take a photo of you, whenever you make a commit | |
# | |
# This is an improved version of Víctor Martínez original post: | |
# http://coderwall.com/p/xlatfq | |
# | |
# Improvements: |
// From the 140bytes wishlist here: https://github.com/jed/140bytes/wiki/Wishlist | |
// TASK: | |
// Create a function which can create a DOM structure from this: | |
// | |
domBuilder( | |
[/HTML/], | |
[/HEAD/], | |
[/TITLE/], | |
"Wouldn't this be cool?", | |
[], |
Use /etc/resolver
. For instance, to change the DNS servers for irc.freenode.net
, create the file
/etc/resolver/irc.freenode.net
And set its contents to
nameserver 8.8.8.8
nameserver 8.8.4.4