Skip to content

Instantly share code, notes, and snippets.

View brendam's full-sized avatar

Brenda Moon brendam

View GitHub Profile
@brendam
brendam / gist:586ca77d6703c36160a75bba3454438e
Created April 5, 2016 03:45
Python url resolving problem
import requests
url = 'http://www.dailytelegraph.com.au/remote/check_cookie.html?url=http%3a%2f%2fwww.dailytelegraph.com.au%2fentertainment%2fsydney-confidential%2fwill-mahalia-find-herself-in-the-bottom-two-for-the-fourth-time-on-the-x-factor%2fstory-fni0cvc9-1227602837497%3futm_source%3dtwitterfeed%26utm_medium%3dtwitter%26utm_campaign%3dFeed%253A+dailytelegraphentertainmentnewsndm+%2528Daily+Telegraph+%257C+Entertainment+News%2529'
print(url)
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36'}
print('Head request')
with requests.Session() as s:
r = s.head(url, allow_redirects=True, timeout=10, headers=headers)
print(r.cookies)
print(r.history)
print(r.status_code)
@brendam
brendam / gist:bdd09ad960c372336282
Created August 14, 2014 03:09
Hard drive recovery
IOThunderboltSwitch<0xffffff802d201e00>(0x0)::listenerCallback - Thunderbolt HPD packet for route = 0x0 port = 1 unplug = 0
[ PCI configuration begin ]
[ PCI configuration end, bridges 14, devices 13 ]
FireWire runtime power conservation disabled. (3)
FireWire (OHCI) Lucent ID 5901 PCI now active, GUID 000a27020052f811; max speed s800.
flow_divert_kctl_disconnect (0): disconnecting group 1
jnl: disk2s3: replay_journal: from: 82776064 to: 87392256 (joffset 0x3a3a000)
disk2s3: I/O error.
0 [Level 3] [Facility com.apple.system.fs] [ErrType IO] [ErrNo 5] [IOType Read] [PBlkNum 123502] [LBlkNum 123502]
0 [Level 3] [Facility com.apple.system.fs] [DevNode devfs] [MountPt /dev] [Path /dev/disk2s3]

Keybase proof

I hereby claim:

  • I am brendam on github.
  • I am brenda (https://keybase.io/brenda) on keybase.
  • I have a public key whose fingerprint is 2119 6B7E 8A7A 4460 D8CA 3BD2 1B51 50A0 F168 3F57

To claim this, I am signing this object:

ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶