I hereby claim:
- I am nucc on github.
- I am nucc (https://keybase.io/nucc) on keybase.
- I have a public key ASDjI8rYMiHwxouz9yiDu7ESO-6JwVJikIcszQdM8R0Pygo
To claim this, I am signing this object:
# Linux | |
for mac in $(iwlist wlan0 scan | grep -o 'Address: .*' | cut -d' ' -f2); do curl -d '{version:"1.1.0",request_address:true,wifi_towers:[{mac_address:"'$mac'"}]}' www.google.com/loc/json; done | |
# Osx (for all access points) | |
for mac in $( /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s | grep -o "\([0-9a-f]\{2\}:\)\{5\}[0-9a-f]\{2\}" ); do curl -d '{version:"1.1.0",request_address:true,wifi_towers:[{mac_address:"'$mac'"}]}' www.google.com/loc/json; done | |
# Osx (connected access point) | |
for mac in $(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep -o "\([0-9a-f]\{1,2\}:\)\{5\}[0-9a-f]\{1,2\}"); do curl -d '{version:"1.1.0",request_address:true,wifi_towers:[{mac_address:"'$mac'"}]}' www.google.com/loc/json; done |
require 'resolv' | |
class EmailValidator < ActiveModel::EachValidator | |
def validate_each(record, attribute, value) | |
unless value =~ /\A([^@\s]+)@([^.\s]+)\..+\z/i and valid_mx_record?(value) | |
record.errors[attribute] << (options[:message] || "is not an email") | |
end | |
end | |
private |
diff --git a/wp-content/themes/frkelly/assets/js/sombrero.js b/wp-content/themes/frkelly/assets/js/sombrero.js | |
index 48e2ef7..da2d481 100755 | |
--- a/wp-content/themes/frkelly/assets/js/sombrero.js | |
+++ b/wp-content/themes/frkelly/assets/js/sombrero.js | |
@@ -49,7 +49,8 @@ | |
}()); | |
slider.containerSelector = options.selector.substr(0,options.selector.search(' ')); | |
- slider.container = $(slider.containerSelector, slider); | |
+ // slider.container = $(slider.containerSelector, slider); |
$ sudo gem install pg -- --with-pg-config=/opt/local/lib/postgresql83/bin/pg_config |
require 'net/https' | |
http = Net::HTTP.new("gdata.youtube.com", 443) | |
http.use_ssl = true | |
uri = URI("https://gdata.youtube.com/feeds/api/videos/56quf8OdX6Q") | |
params = { :v => "2" } | |
uri.query = URI.encode_www_form(params) | |
req = Net::HTTP::Get.new(uri.to_s) |
require "addressable/uri" | |
uri = Addressable::URI.new | |
hash = Hash.new | |
uri.query_values = hash | |
uri.query |
# | |
# Creates delegators for Rails.logger.(error|warning|info|debug) | |
# methods. | |
# | |
# Example: | |
# | |
# class DemoController < ActionController::Base | |
# def index | |
# info "Demo controller #index has been called", parameters: params | |
# end |
# Paste the following code to your ~/.irbrc | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
ARGV.concat [ "--readline", "--prompt-mode", "simple" ] | |
IRB.conf[:SAVE_HISTORY] = 100 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" |
I hereby claim:
To claim this, I am signing this object: