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
3:24 AV: [ is Breitbart alt-right? ] JP: [ no ] | |
4:55 JP: [ disavows nazis, white supremacists, “deplorables” ] “there’s no room for them on our website and never will be.” | |
5:18 [they both explore how MSNBC and Breitbart aren’t so different, you and i] | |
6:53 JP: [Huffington post readers and Breitbart readers are similar in this way] | |
7:14 JP: [interesting points about MS’s brand and current success] |
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 -w | |
# using enumerators and lazy evaluation in ruby | |
class MyLazyEnumerator < Enumerator | |
def filter &b | |
self.class.new do |y| | |
each do |*a| | |
b.call(y, *a) |
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 -w | |
class Foo | |
def foo &block | |
block.call "i am foo" | |
end | |
end | |
class Bar < Foo | |
def foo &block |
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 -w | |
# | |
class SSID < Struct.new(:ssid, :strength) | |
end | |
ssids = [ | |
SSID.new('own-AP', 0.4444), | |
SSID.new('own-AP', 0.3), | |
SSID.new('soma', 0.2), | |
SSID.new('soma', 0.4), |
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
hipe@hipe-macbook-pro ~/petrify/example > ./build.js | |
4 Mar 05:26:35 - load: articles | |
4 Mar 05:26:35 - load: home | |
4 Mar 05:26:35 - load: navigation | |
4 Mar 05:26:35 - load: tags | |
4 Mar 05:26:35 - load: years | |
4 Mar 05:26:35 - load: article_one.md | |
4 Mar 05:26:35 - load: article_three.md | |
4 Mar 05:26:35 - load: article_two.md | |
4 Mar 05:26:35 - ERROR in navigation view: Cannot read property 'date' of undefined |
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
class Foo | |
class << self | |
def make_this_method name, &block | |
define_method(name, &block) | |
end | |
end | |
end | |
Foo.make_this_method(:bar) do |*args| | |
case args.size |
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
##################### tmp.rb ########################## | |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'open4' | |
require 'ruby-debug' | |
puts "starting ruby." | |
status = Open4.open4('sh') do |pid, sin, sout, serr| |
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 | |
hash = {} | |
ARGV.each do |str| | |
if /^--([-_a-z0-9]+)=(.+)$/i =~ str | |
hash[$1] = $2 | |
end | |
end | |
pp hash | |
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
5/13/10 6:12:31 AM org.x.startx[22815] . | |
5/13/10 6:12:32 AM org.x.startx[22815] AUDIT: Thu May 13 06:12:32 2010: 22860 X: client 3 rejected from local host (uid 503) | |
5/13/10 6:12:32 AM org.x.startx[22815] Xlib: connection to ":6.0" refused by server | |
5/13/10 6:12:32 AM org.x.startx[22815] Xlib: No protocol specified | |
5/13/10 6:12:32 AM org.x.startx[22815] . | |
5/13/10 6:12:33 AM org.x.startx[22815] . | |
5/13/10 6:12:34 AM org.x.startx[22815] AUDIT: Thu May 13 06:12:34 2010: 22860 X: client 3 rejected from local host (uid 503) | |
5/13/10 6:12:34 AM org.x.startx[22815] Xlib: connection to ":6.0" refused by server | |
5/13/10 6:12:34 AM org.x.startx[22815] Xlib: No protocol specified | |
5/13/10 6:12:34 AM org.x.startx[22815] . |
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
irb(main):022:0> COUNTRIES.keys | |
=> ["VA", "CC", "GT", "JP", "SE", "TZ", "CD", "GU", "MM", "DZ", "MN", "PK", "SG", "VC", "CF", "GW", "MO", "PL", "SH", "CG", "MP", "PM", "SI", "VE", "ZW", "CH", "GY", "MQ", "PN", "SJ", "CI", "MR", "SK", "VG", "MS", "SL", "CK", "ID", "MT", "SM", "VI", "YE", "CL", "IE", "LA", "MU", "SN", "CM", "FI", "LB", "MV", "PR", "SO", "CN", "FJ", "LC", "MW", "PS", "CO", "FK", "MX", "PT", "MY", "SR", "VN", "FM", "MZ", "CR", "PW", "FO", "ST", "IL", "LI", "PY", "BA", "CU", "IM", "SV", "CV", "FR", "IN", "LK", "BB", "IO", "VU", "CX", "RE", "UA", "SY", "CY", "IQ", "SZ", "BD", "CZ", "IR", "YT", "BE", "IS", "BF", "EC", "IT", "OM", "BG", "BH", "LR", "UG", "BI", "EE", "LS", "BJ", "LT", "EG", "BL", "EH", "LU", "RO", "BM", "LV", "BN", "UM", "BO", "KE", "NA", "LY", "BR", "KG", "NC", "RS", "BS", "HK", "KH", "BT", "KI", "NE", "QA", "RU", "HM", "NF", "US", "BV", "ER", "HN", "NG", "RW", "BW", "ES", "ET", "NI", "AD", "BY", "KM", "AE", "BZ", "HR", "KN", "TC", "AF", "NL", "TD", "AG", "HT", "KP", "UY", "GA", "HU" |
NewerOlder