Skip to content

Instantly share code, notes, and snippets.

<!-- @trevorstarick starick.me -->
<!-- GitHub-Event-Map v1.0.0 -->
<!-- do what you want with this. -->
<!-- my code sucks. deal with it. -->
<!-- have fun :) -->
<html>
<!-- START CRAPPY CODE -->
<head>
<!-- HEADER AND CSS/JS STUFF -->
<!-- Paste this script where you want the map to be shown -->
<script id="stay22-script">
document.addEventListener("DOMContentLoaded", function(e) {
// 1. Edit widget size
var settings22 = {
width: '100%', // set the width in px or %
height: '375px' // set the height in px or %
};
// 2. Fill out your config here and the rest should work
package main
import "os"
import "fmt"
import "strings"
import "io/ioutil"
var err error
var blob string
var path = "/etc/munin/munin-conf.d/hosts.conf"

Keybase proof

I hereby claim:

  • I am trevorstarick on github.
  • I am trevorstarick (https://keybase.io/trevorstarick) on keybase.
  • I have a public key ASClawy7xBWRF7FRQZGHrqp0O9dG5OrQ6mHkV9MRlwAgOQo

To claim this, I am signing this object:

/*jslint node: true */
'use strict';
var schema = {
"root": "https://airbnb.ca/",
"urls": [{
"url": "rooms/ajax_refresh_subtotal?checkin={{in}}&checkout={{out}}&number_of_guests={{guests}}&hosting_id={{id}}&currency=USD",
"method": "GET",
"format": "JSON"
}],
This file has been truncated, but you can view the full file.
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "adm1_code": "ABW+00?", "Shape_Leng": 0.652367089006, "Shape_Area": 0.0141188792903, "diss_me": 10000, "adm1_code_": "ABW+00?", "iso_3166_2": "AW-", "wikipedia": null, "sr_sov_a3": "NL1", "sr_adm0_a3": "ABW", "iso_a2": "AW", "adm0_sr": 3, "admin0_lab": 6, "name": "ABW-00 (Aruba aggregation)", "name_alt": null, "name_local": null, "type": null, "type_en": null, "code_local": null, "code_hasc": null, "note": null, "hasc_maybe": null, "region": null, "region_cod": null, "region_big": null, "big_code": null, "provnum_ne": 0, "gadm_level": 0, "check_me": 0, "scalerank": 10, "datarank": 10, "abbrev": null, "postal": null, "area_sqkm": 0.0, "sameascity": -99, "labelrank": 20, "featurecla": "Admin-1 aggregation", "admin": "Aruba", "name_len": 26, "mapcolor9": 2, "mapcolor1
Adobe CS6/CC
Alfred
AppCleaner
Cinch
Flux
GitHub
Google Chrome
Homebrew
Microsoft Office
Minecraft
#!/usr/bin/env python
import requests, zipfile, xmltodict
from StringIO import StringIO
from pymongo import MongoClient, GEO2D
client = MongoClient()
db = client.outpost
placeRentals = db.placeRentals
<room>
<id type="integer">55</id>
<title>2 bedroom available in chelsea</title>
<type>apartment</type>
<subtype></subtype>
<url><![CDATA[http://k.keyade.com/kack/1/?kaPt=custom&amp;kaTckM=da&amp;kaPcId=97622&amp;kaTckId=59421&amp;kaRdt=https%3A%2F%2Fwww.roomorama.com%2Fshort-term-rentals%2Fnew-york%2Flower-manhattan%2Fapartment%2F55%3Fchannel%3Doutpost%26utm_medium%3Daffiliate%26utm_source%3Doutpost]]></url>
<num_rooms type="integer">1</num_rooms>
<num_bathrooms></num_bathrooms>
<max_guests type="integer">2</max_guests>
<min_stay type="integer">5</min_stay>
elif 'id' in urlparse.parse_qs(parsed.query):
cur.execute("SELECT * FROM properties WHERE id = '"+urlparse.parse_qs(parsed.query)['id'][0]+"'")
temp = cur.fetchall()
for node in temp:
amneties = [i.replace('"','') for i in node[17].split(',')[1:-1]]
r = requests.get(node[6])
soup = BeautifulSoup(r.text)
imgs = []
soupyImg = soup.findAll('img','show_zoom')
for i in soupyImg: