Skip to content

Instantly share code, notes, and snippets.

@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active April 21, 2024 03:30
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@pixelrevision
pixelrevision / PXRPropSerializer.h
Created February 6, 2014 01:17
Property Serializer
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
typedef enum {
PXRPropSerializerTypeUnknown,
PXRPropSerializerTypeFloat,
PXRPropSerializerTypeDouble,
PXRPropSerializerTypeInt,
PXRPropSerializerTypeClass,
PXRPropSerializerTypeBool
@gngrwzrd
gngrwzrd / fix-xcode.py
Last active December 23, 2015 11:28 — forked from rnapier/fix-xcode
#!/usr/bin/python
#original script by Rob Napier <robnapier@gmail.com>
#updates by github.com/gngrwzrd
#Script to link in all your old SDKs every time you upgrade Xcode
#Create a directory somewhere to store older SDKs in
#Under it, put all the platform directories:
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform
#Under those, store the SDKs:
@pixelrevision
pixelrevision / resize_ios_images.py
Last active December 21, 2015 11:39
Resize iOS images
'''
requires imagemagick to be installed. http://www.imagemagick.org/script/index.php
requires pngquant to be installed if using compression on pngs. http://pngquant.org/
'''
import os
import sys
import subprocess
import argparse
import shutil
import mimetypes
@pixelrevision
pixelrevision / resize_android_images.py
Last active December 19, 2015 06:49
Process Android images
'''
requires imagemagick to be installed. http://www.imagemagick.org/script/index.php
'''
import os
import sys
import subprocess
import argparse
# defines the input we want to use. Change the directory name or the target DPI to set this.
inputDirName = "drawable-xhdpi"
@willurd
willurd / web-servers.md
Last active May 10, 2024 05:14
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e