Skip to content

Instantly share code, notes, and snippets.

View gist:94a6c586465d3b60495e470035af0214
sudo find /private/var/folders/ -name -exec rm {} \;
alexanza / gist:70c09d9b283c242b834987f2646f8065
Created Nov 29, 2016 — forked from jagregory/gist:710671
How to move to a fork after cloning
View gist:70c09d9b283c242b834987f2646f8065
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork
alexanza / simulator_populator
Created Sep 26, 2016 — forked from cabeca/simulator_populator
This script removes and recreates all simulators in Xcode 6.
View simulator_populator
#!/usr/bin/env ruby
device_types_output = `xcrun simctl list devicetypes`
device_types = device_types_output.scan /(.*) \((.*)\)/
runtimes_output = `xcrun simctl list runtimes`
runtimes = runtimes_output.scan /(.*) \(.*\) \(([^)]+)\)$/
devices_output = `xcrun simctl list devices`
devices = devices_output.scan /\s\s\s\s(.*) \(([^)]+)\) (.*)/
alexanza /
Created May 12, 2016 — forked from mokagio/
Script updating all plugins to be compatible with the latest Xcode and Xcode-beta
# Updates all plug-ins to be compatible with the latest Xcode and Xcode-beta
plugins_location="~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins"
# Get Xcode's version
current_xcode_version="$(defaults read /Applications/ DVTPlugInCompatibilityUUID)"
alexanza /
Last active Mar 10, 2021
Expiration date picker for credit card (tested on api 19 and up)
public class ExpirationDatePickerDialog extends DatePickerDialog implements DatePicker.OnDateChangedListener {
public ExpirationDatePickerDialog(Context context, OnDateSetListener callBack, int year, int monthOfYear, int dayOfMonth) {
Build.VERSION.SDK_INT >= 21 ? : 0,
alexanza /
Created Oct 15, 2015 — forked from rrosiek/
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Outputs nearly everything to /dev/null since "quiet" on most commands is still noisy.
#! /usr/bin/env bash
# Variables
echo -e "\n--- Mkay, installing now... ---\n"