Skip to content

Instantly share code, notes, and snippets.

View crock's full-sized avatar
🐊
Probably designing or coding something...

Alex Crocker crock

🐊
Probably designing or coding something...
View GitHub Profile
@crock
crock / wunderground_parser.php
Last active March 13, 2016 22:22
Wunderground - Fetches XML file and extracts temperature and current weather condition
<?php
$xmlfeed = file_get_contents("http://api.wunderground.com/api/YOUR_API_KEY/conditions/q/FL/Orlando.xml");
$xml = simplexml_load_string($xmlfeed);
print $xml->asXML('data/Orlando.xml');
$xml = simplexml_load_file('data/Orlando.xml');
$temp = $xml->current_observation->temp_f . "&deg;F";
$weather = $xml->current_observation->weather;
@crock
crock / like_tweet.py
Last active March 13, 2016 22:06
Pythonista (iOS) script to fetch a Twitter status link from your clipboard and then like/favorite it
# coding: utf-8
import twitter
import json
import re
import clipboard
account = twitter.get_account('acrockr')
# Do not touch the code below