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 / 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
@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;

Keybase proof

I hereby claim:

  • I am crocbuzz on github.
  • I am croc (https://keybase.io/croc) on keybase.
  • I have a public key whose fingerprint is 2489 EEC5 931A EDB5 972C A462 55DE 6232 6DFC C471

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am crock on github.
  • I am croc (https://keybase.io/croc) on keybase.
  • I have a public key whose fingerprint is 2489 EEC5 931A EDB5 972C A462 55DE 6232 6DFC C471

To claim this, I am signing this object:

@crock
crock / 1-1000.txt
Created August 29, 2017 13:15 — forked from deekayen/1-1000.txt
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that
@crock
crock / accorelib.py
Last active February 15, 2018 01:28
My personal collection of utility functions for Python
import string
import random
class accorelib:
"""My personal collection of utility functions"""
def __init__(self):
print("accorelib initialized...")
def debug(self, message):
@crock
crock / accorelib.js
Last active February 15, 2018 01:40
My personal collection of utility functions for JavaScript (ES6)
class accorelib {
debug(message) {
console.log("[DEBUG] " + message)
}
}
@crock
crock / accorelib.php
Last active February 15, 2018 02:04
My personal collection of utility functions for PHP
<?php
class accorelib {
/**
* Prints out contents of variable surrounded with <pre> tags for easier analysis
*
* @param [Any] $variable - the variable to print out to page
* @return void
*/
import re
class Filters(object):
config = {}
def __init__(self, obj):
self.config = obj
import requests # http://docs.python-requests.org/en/master/
from bs4 import BeautifulSoup # https://www.crummy.com/software/BeautifulSoup/
def check(name):
"""
Function to check the availability of a specific Steam ID.
"""
session = requests.Session() # Initilzes a new session object from the requests module
matches = [] # Creates an empty list to hold our match objects
requestUrl = "https://steamcommunity.com/id/%s" % name # Creates a variable to hold our request url which should be the url to the Steam profile page