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
| #!/usr/bin/env ruby | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'ap' | |
| doc = Nokogiri::HTML(open('http://barcamproc.org/sponsor/')) | |
| targets = ['money', 'fall'] | |
| found_nodes = [] |
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
| #!/usr/bin/env ruby | |
| class Crossfire | |
| #SUITS = ["Clubs","Hearts","Spades","Diamonds"] | |
| #PIPS = ["2","3","4","5","6","7","8","9","10","Jack","Queen","King","Ace"] | |
| SUITS = ["Yellow","Star","Meat","Fungus"] | |
| PIPS = 1..13 | |
| SUIT_VALUES = SUITS.each_with_index.to_a | |
| PIP_VALUES = PIPS.each_with_index.to_a |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'combinatorics' | |
| word_file = "/usr/share/dict/words" | |
| File.exists?(word_file) || puts("Missing #{word_file}") || exit | |
| original_target_length = 14 | |
| min_word_size = 3 |
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
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "json" | |
| require "sinatra" | |
| require "nameable" | |
| get '/*/*.*' do |raw_name, function, type| | |
| begin | |
| name = Nameable::Latin.new.parse(raw_name) |
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
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "json" | |
| require "sinatra" | |
| require "nameable" | |
| get '/*/*.*' do |raw_name, function, type| | |
| begin | |
| name = Nameable::Latin.new.parse(raw_name) |
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
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "json" | |
| require "sinatra" | |
| require "./lib/nameable" | |
| get '/*/*.*' do |raw_name, function, type| | |
| begin | |
| name = Nameable::Latin.new.parse(raw_name) |
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
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "json" | |
| require "sinatra" | |
| require "./lib/nameable" | |
| get '/*/*.*' do |raw_name, function, type| | |
| begin | |
| name = Nameable::Latin.new.parse(raw_name) |
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
| ["Patient", "Clinician", "Parent/caretaker"].each do |role| | |
| make "\#{role} Name", from("\#{role} first name", "\#{role} middle initial", "\#{role} last name") do |fname, minitial, lname| | |
| Contact.normalize_name("\#{fname.to_s} \#{minitial.blank? ? '' : minitial + '. '}\#{lname.to_s}") | |
| end | |
| 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
| #!/bin/bash | |
| TIMESTAMP="`date`" | |
| OWNER="`grep $1 /etc/arpalert/maclist.dat | cut -f 2`" | |
| TMP="/tmp/arpalert_${1}.xml" | |
| sudo nmap -oX "${TMP}" --webxml --system-dns -A $2 | |
| case "$5" in | |
| 0) TYPE="ip change" ;; | |
| 1) TYPE="mac address only detected but not in white list" ;; | |
| 2) TYPE="mac address in black list" ;; |
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
| [0] 43.1673927307129, | |
| [1] -77.64658355712892 |