Skip to content

Instantly share code, notes, and snippets.

View brianly's full-sized avatar
🦙
Don't get much time to hack right now due to 👶

Brian Lyttle brianly

🦙
Don't get much time to hack right now due to 👶
View GitHub Profile
@brianly
brianly / Solarized Dark.xml
Created January 16, 2012 18:47
Solarized Dark for PyCharm (Brian's edits of https://github.com/jkaving/intellij-colors-solarized)
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="Solarized Dark" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="14" />
<option name="EDITOR_FONT_NAME" value="Consolas" />
<colors>
<option name="ADDED_LINES_COLOR" value="" />
<option name="ANNOTATIONS_COLOR" value="2b36" />
<option name="ANNOTATIONS_MERGED_COLOR" value="" />
<option name="CARET_COLOR" value="dc322f" />
@brianly
brianly / hack.sh
Created March 31, 2012 14:57 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@brianly
brianly / remove-xcode.sh
Created April 18, 2012 19:05
Xcode removal commands
sudo /Developer/Library/uninstall-devtools –mode=all
sudo rm -rf /Developer*
sudo rm -f /Applications/*Xcode.app
from django.test import LiveServerTestCase
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Composition;
using System.Deployment.Application;
using System.Globalization;
using System.Linq;
using System.Reactive.Linq;
using System.Timers;
using System.Windows;
@brianly
brianly / synciefind
Created October 31, 2012 21:38
Finds lines in the Syncie Log page. Copy the Syncie page to a text file first, obviously.
#!/usr/bin/python
import re
import argparse
import locale
# Accept a sane looking network ID
parser = argparse.ArgumentParser(description='Syncie Log Parser')
parser.add_argument('-n', action="store", dest="network", type=int)
args = parser.parse_args()
@brianly
brianly / offie.py
Created December 30, 2012 03:01 — forked from anonymous/offie.py
from boto import ec2
regions = ec2.regions()
for region in regions:
print region.name
conn = ec2.connect_to_region(region.name)
instances = conn.get_all_instances()
@brianly
brianly / acrylaport.py
Last active December 11, 2015 01:18
The guts of a script to convert posts from a WordPress blog export into markdown for use with Acrylamid.
import os
import codecs
import xml.etree.ElementTree as etree
from dateutil import parser as du
from urlparse import urlparse
def parse_export(path):
"""Parses the WordPress export file into a Python-native format"""
@brianly
brianly / gist:4574309
Created January 19, 2013 18:55
Stupid WinForms example showing how to Embed a browser control and handle Yammer OAuth.
// Add these to a form:
// * Web Browser
// * Button 1 (starts the process)
// * Button 2 (outputs the current URL)
// * TextBox 1 (logs actions)
// * TextBox 2 (for the token)
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.Navigate("https://www.yammer.com/dialog/oauth?client_id=SFZc9HHFXK77keEFYdXphw&redirect_uri=http://brianlyttle.com/yammer/mshtml/redirect_uri&response_type=token");
@brianly
brianly / auth.py
Last active December 14, 2015 11:38
An example showing you how to get an Access Token with YamPy.
# -*- coding: utf-8 -*-
import os
import yampy
import webbrowser
# Configure all of these constants at https://www.yammer.com/client_applications
CLIENT_ID = ''
CLIENT_SECRET = ''
REDIRECT_URI = 'http://brianlyttle.com/yammer/'