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
require 'mail' | |
require 'zlib' | |
require 'zip' | |
require 'yaml' | |
require 'stringio' | |
def file_list(contents, command) | |
file = Tempfile.new('parsemail') | |
file.write(contents) | |
file.close |
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
require 'ruby2js/filter/functions' | |
gist = 'https://gist.github.com/mnot/138549' | |
uri_validate = '/home/rubys/tmp/uri_validate.py' | |
# fetch gist, if necessary | |
if not File.exist? uri_validate | |
require 'nokogumbo' | |
raw = Nokogiri::HTML5.get(gist).at('a[aria-label="View Raw"]')['href'] | |
Dir.chdir File.dirname(uri_validate) do | |
system "wget -O #{uri_validate} #{URI.parse(gist)+raw}" |
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
{ | |
"accessibilityinindia": 0, | |
"infographics": 0, | |
"svga11y": 1, | |
"activitypub": 0, | |
"adopsdnt": 0, | |
"coders4africa": 13, | |
"agelabels": 0, | |
"agri": 0, | |
"model": 0, |
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
require 'nokogumbo' | |
require 'date' | |
require 'json' | |
start = Date.today - 105 | |
results = {} | |
index = 'http://www.w3.org/community/groups/' | |
groups = Nokogiri::HTML5.get(index) | |
groups = groups.search('a.h3').map {|a| a['href'].sub(/^#/, '')} |
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
require 'nokogumbo' | |
require 'date' | |
require 'json' | |
start = Date.today - 105 | |
results = {} | |
index = 'http://www.w3.org/community/groups/' | |
groups = Nokogiri::HTML5.get(index) | |
groups = groups.search('a.h3').map {|a| a['href'].sub(/^#/, '')} |
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
{ | |
"accessibilityinindia": 0, | |
"infographics": 0, | |
"svga11y": 1, | |
"activitypub": 0, | |
"adopsdnt": 0, | |
"coders4africa": 13, | |
"agelabels": 0, | |
"agri": 0, | |
"model": 0, |
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
# expand anchor 'macros' | |
for anchor in anchors[:]: | |
if 'url#' in anchor: | |
anchors.remove(anchor) | |
urlprefix = anchor['url#'] | |
del anchor['url#'] | |
linkingText = anchor.get('linkingText') | |
if isinstance(linkingText, list): | |
for link in linkingText: | |
anchor['linkingText'] = link |
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
src = Dir.chdir File.dirname(__FILE__) do | |
system 'git checkout url.src.html' | |
File.read('url.src.html') | |
end | |
# replace boilerplate with metadata | |
src.sub! /\A.*?\n<h2/m, <<-EOF + "\n<h2" | |
<pre class="metadata"> | |
Title: URL Standard | |
Group: WHATWG |
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
$ brew --config | |
HOMEBREW_VERSION: 0.9.5 | |
ORIGIN: https://github.com/Homebrew/homebrew | |
HEAD: d48206e0d63fe34e22fa3248165340fdd513e8aa | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: 8-core 64-bit haswell | |
OS X: 10.9.3-x86_64 | |
Xcode: 5.1.1 | |
CLT: 5.1.0.0.1.1396320587 |
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
UID PID PPID C STIME TTY STAT TIME CMD | |
rubys 14214 14213 0 11:13 ? S 0:00 bash /home/rubys/.rvm/scripts/db /home/rubys/.rvm/user/db _ | |
rubys@rubix:~$ ps -f 14213 | |
UID PID PPID C STIME TTY STAT TIME CMD | |
rubys 14213 14191 0 11:13 ? S 0:00 bash /home/rubys/.rvm/scripts/db /home/rubys/.rvm/user/db _ | |
rubys@rubix:~$ ps -f 14191 | |
UID PID PPID C STIME TTY STAT TIME CMD | |
rubys 14191 14190 0 11:13 ? S 0:00 bash /home/rubys/.rvm/scripts/db /home/rubys/.rvm/user/db _ | |
rubys@rubix:~$ ps -f 14191 | |
UID PID PPID C STIME TTY STAT TIME CMD |