Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt H matthewhochler

View GitHub Profile
View fluidapp-fastmail.js
/*
Fluid App Userscript
FastMail web interface
URL pattern: *fastmail.fm/mail/*
*/
setTimeout(updateDockBadge, 3000);
setInterval(updateDockBadge, 5000);
INBOX_ONLY = true;
View bookmarklet-twitter-profie-ios
javascript:
// Take the current page URL and put it in a variable called url
var url = document.URL;
// Create a new variable called tweetbotProfile and replace the mobile twitter url with the Tweetbot x-callback-url scheme
var tweetbotProfile = url.replace(/https:\/\/(mobile.)?twitter.com\//,"tweetbot:///user_profile/");
// Go to the new URL in tweetbotProfile
window.location = tweetbotProfile;
@jacob414
jacob414 / create_project.sh
Created May 16, 2012 — forked from shazow/create_project.sh
Setup deployment target for Nginx + Python/uWSGI + Supervisor + Git (for a Linode Stackscript)
View create_project.sh
#!/bin/bash
# Setup deployment target for Nginx + Python/uWSGI + Supervisor + Git
# From: https://gist.github.com/1210041
function usage() {
cat << EOF
Usage: $0 PROJECT_NAME [DOMAIN] [OPTIONS]
Options:
-y No prompts, assume yes to all.
View random-flix-0.4.1.user.js
// ==UserScript==
// @name random-flix
// @namespace http://thekreml.in
// @version 0.4.1
// @grant none
// @description Add a 'Random Episode' button to Netflix Watch Instantly pages.
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
// @match http://movies.netflix.com/WiMovie/*
// ==/UserScript==
@drdrang
drdrang / WeatherUnderground.py
Created Feb 23, 2014
Pythonista script for generating and displaying the local weather.
View WeatherUnderground.py
#!/usr/bin/python
import json
import requests
import time
from datetime import datetime
import location
import webbrowser
import BaseHTTPServer
View iosgfx.rb
#!/usr/bin/env ruby
# encoding: utf-8
#
# Download 1136x1136 screenshots and 512x512 icon from iTunes for a list of
# search terms.
#
# Jon Roes <jroes@heroku.com>
#
# Example:
# $ iosgfx search_terms.txt
View bookmarklet-twitter-profie-ios
javascript:
// Take the current page URL and put it in a variable called url
var url = document.URL;
// Create a new variable called tweetbotProfile and replace the mobile twitter url with the Tweetbot x-callback-url scheme
var tweetbotProfile = url.replace("https://mobile.twitter.com/","tweetbot:///user_profile/");
// Go to the new URL in tweetbotProfile
window.location = tweetbotProfile;
View install_cx_Oracle_on_elcapitan.md

This document has been obsolete since Oracle Instant Client 12.1 for OS X was released. The 12.1 client supports OS X 10.11 El Capitan, 10.10 Yosemite, and 10.9 Mavericks and can connect to Oracle Database 10.2 or later.

Look at [this document][inst] to install 12.1.

You should add the environment variable FORCE_RPATH to link with -rpath on compilation. (You have no need to set the environment variable at runtime.)

@iiska
iiska / validator.py
Created Oct 22, 2009
Simple XML Schema validator in Python using lxml library
View validator.py
#! /usr/bin/python
# -*- coding: utf-8 -*-
#
# Simple XML validator done while learning the use of lxml library.
# -- Juhamatti Niemelä <iiska AT iki DOT fi>
import lxml
from lxml import etree
if __name__ == "__main__":
@masnick
masnick / phone_format.rb
Created Jan 27, 2015
Phone number format script for TextExpander snippet
View phone_format.rb
#! /usr/bin/env ruby
# Source: tadman on StackOverflow - http://stackoverflow.com/a/5913838
def formatted_number(number)
digits = number.gsub(/\D/, '').split(//)
if (digits.length == 11 and digits[0] == '1')
# Strip leading 1
digits.shift