Skip to content

Instantly share code, notes, and snippets.

View geoff-nixon's full-sized avatar

Geoff Nixon geoff-nixon

View GitHub Profile
@pudquick
pudquick / mas_updates.py
Last active January 25, 2024 15:47
Mac App Store updates
# App Store playing
import urllib, urllib2, json, plistlib
###
# Utility function for performing an iTunes-style search
def perform_itunes_search(api_url, query_list=[]):
query_str = urllib.urlencode(query_list)
response_handle = urllib2.urlopen('https://itunes.apple.com/%s?%s' % (api_url, query_str))
@EmbeddedAndroid
EmbeddedAndroid / qemu-ifup
Created September 15, 2013 17:24
Mac OSX (10.8.X) /etc/qemu-ifup script for QEMU/KVM bridged networking.
#!/bin/bash
echo "Executing /etc/qemu-ifup"
echo "Creating bridge"
sysctl -w net.link.ether.inet.proxyall=1
sysctl -w net.inet.ip.forwarding=1
sysctl -w net.inet.ip.fw.enable=1
ifconfig bridge0 create
echo "Bringing up $1 for bridged mode"
ifconfig $1 0.0.0.0 up
echo "Add $1 to bridge"
@evertton
evertton / gfm2html.sh
Last active December 29, 2023 09:51
Convert a Github Flavored Markdown Syntax file to HTML
#!/bin/bash
# Convert a Github Flavored Markdown Syntax file to HTML
#
# The MIT License (MIT)
# Copyright © 2012 Evertton de Lima <e.everttonlima@gmail.com>
# http://evertton.mit-license.org/
# Stylesheet feature by Dan Untenzu <mail@pixelbrackets.de>
#
# Requirements: cURL (sudo apt-get install curl)
@ttscoff
ttscoff / flavor.rb
Created September 16, 2012 16:01
Quick wrapper to convert Markdown to HTML via Github API
#!/usr/bin/ruby
# Convert a Markdown README to HTML with Github Flavored Markdown
# Github and Pygments styles are included in the output
#
# Requirements: json gem (`gem install json`)
#
# Input: STDIN or filename
# Output: STDOUT
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file
# cat README.md | flavor > README.html
@shazron
shazron / sim-run.sh
Created October 25, 2011 21:53
Run Xcode Simulator project from the command line
#!/bin/bash
#
# Build and iPhone Simulator Helper Script
# Shazron Abdullah 2011
#
# WARN: - if your .xcodeproj name is not the same as your .app name,
# this won't work without modifications
# - you must run this script in where your .xcodeproj file is
PROJECTNAME=$1
@mikelikespie
mikelikespie / colors.js
Created October 22, 2010 23:01
Quick code to convert sRGB to CIE L*a*b* and back.
/*
* To try it:
* c = $c.sRGB8(23,58,32);
* c.Lab();
* c.Lab().sRGB8();
*/
var $c = {};
(
function () {
@subtleGradient
subtleGradient / safari-get-html.js
Created June 16, 2010 18:51
Node.js JavaScript for Mac OS X. Uses osascript AppleScript to control Safari. Remote control Safari from the terminal!
#!/usr/bin/env node #// -*- Mode: Node.js JavaScript; tab-width: 4; -*-
/*
---
url: http://gist.github.com/441101
name : safari-get-html
description : safari-get-html will rock your socks!
authors : Thomas Aylott
copyright : © 2010 Thomas Aylott
license : MIT