Skip to content

Instantly share code, notes, and snippets.

Avatar

Jake Austwick JakeAustwick

  • Software Development
  • United Kingdom
View GitHub Profile
View gist:635541945915fc06f95a1866ed7a89e8
195.154.161.89:3941
195.154.161.89:3942
195.154.161.89:3943
195.154.161.89:3944
195.154.161.89:3945
195.154.161.89:3946
195.154.161.89:3947
195.154.161.89:3948
195.154.161.89:3949
195.154.161.89:3950
@JakeAustwick
JakeAustwick / gist:10689478
Last active Aug 29, 2015
Go 1.1.1 http bug
View gist:10689478
➜ domaincrawler go run bug.go
2014/04/15 00:17:00 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil>
2014/04/15 00:17:04 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil>
2014/04/15 00:17:07 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil>
2014/04/15 00:17:09 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil>
2014/04/15 00:17:11 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil>
2014/04/15 00:17:14 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil>
2014/04/15 00:17:16 Unsolicited response received on idle HTTP channel starting with "\x1f"; err=<nil>
➜ domaincrawler cat bug.go
View gist:5178469
>>> 'SitesView'.rstrip('View').rstrip('s')
'Site'
>>> 'SitesView'.rstrip('sView')
'Sit'
View generated.js
(function() {
var __opal = Opal, self = __opal.top, __scope = __opal, nil = __opal.nil, __breaker = __opal.breaker, __slice = __opal.slice, __klass = __opal.klass;
var jake = nil;
(function(__base, __super){
// line 1, (file), class Person
function Person() {};
Person = __klass(__base, __super, "Person", Person);
var Person_prototype = Person.prototype, __scope = Person._scope;
View gist:3738028
_ajax_fetch_list_nonce ae00c9a72f
_ajax_nonce f80d273296
_ajax_nonce f80d273296
_ajax_nonce f80d273296
_ajax_nonce f80d273296
_ajax_nonce f80d273296
_ajax_nonce-add-meta eb16671e3f
_ajax_nonce-add-product_c... 343c0f98bb
_backorders no
_button_text
View gist:3677013
file1 = open(file1)
file2 = open(file2)
for l, l2 in zip(file1,file2):
if l[0] == l2[0]:
# do something
View gist:3669643
class User < ActiveRecord::Base
# Other stuff removed
belongs_to :plan
belongs_to :stripe_plan
def plan
self.stripe_token.to_s == "0" ? self.plan : self.stripe_plan
end
# Other stuff removed
View gist:3667669
>>> import gevent
>>> from gevent import socket
>>> urls = ['www.google.com', 'www.example.com', 'www.python.org']
>>> jobs = [gevent.spawn(socket.gethostbyname, url) for url in urls]
>>> gevent.joinall(jobs, timeout=2)
>>> [job.value for job in jobs]
['74.125.79.106', '208.77.188.166', '82.94.164.162']
View gist:2975587
$(':input').each(function(){
$(this).change(function(){
alert('hi');
});
})
View gist:2974528
class Product
def self.hello
'hello from the product class'
end
def hello
"hello from an instance, I'm a product with the ID #{self.id}"
end
end