Skip to content

Instantly share code, notes, and snippets.

View markcerqueira's full-sized avatar
📌
Join me! Pinterest is hiring!

Mark Cerqueira markcerqueira

📌
Join me! Pinterest is hiring!
View GitHub Profile
@markcerqueira
markcerqueira / .git_bash
Last active December 14, 2015 22:08
Useful git branch stuff for your bash_profile
# displays handy info when in git directories
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
function parse_hg_branch {
hg branch 2> /dev/null | sed 's/..*/\ \[&\]/'
}
function prom1 {
PS1="\w\
\$(parse_git_branch)\$(parse_hg_branch) "
### Keybase proof
I hereby claim:
* I am markcerqueira on github.
* I am markcerqueira (https://keybase.io/markcerqueira) on keybase.
* I have a public key whose fingerprint is 33B3 AC7E F7E6 6D6B 8CC4 06AC 6475 B202 D01D 64BD
To claim this, I am signing this object:
@markcerqueira
markcerqueira / gist:9902072
Created March 31, 2014 20:57
CrashPlan and the Mac library folder
This file seeks to explain what should and should not be backed up from the Library folder on your Mac to minimize the amount of data sent over the wire to your backup server. Some files in the Library folder are important to backup whereas others are not critical.
There are two general strategies for handling the Library folder:
1. Start with nothing (de-select the Library folder) and selectively add files/folders
2. Start with everything and de-select files/folders we do not want to back up
Regardless of strategy, here are some things that you SHOULD back up and things you SHOULD NOT back up. Note, the exclusion list includes folders outside the Library folder that should also not be backed up.
GOOD TO BACK UP
@markcerqueira
markcerqueira / xcode_build_phase.sh
Created January 11, 2015 19:52
Crittercism Auto-Upload dSYM with API Key as an environmental variable
# only upload during Release builds, otherwise every build will upload a dSYM
if [ "${CONFIGURATION}" = "Release" ]; then
# put the secret key in this file as an environmental variable
if [ -f ~/.crittercism_keys ]; then
# this is required to inject the environmental variables into the shell spawned by Xcode
source ~/.crittercism_keys
APP_ID="MY_FIRST_APP_ID_abcdefghi"
# instead of having your API key here, it is copied in from the environmental varible
@markcerqueira
markcerqueira / imggen.py
Last active August 29, 2015 14:15
A Python script to generate HUGE images
#!/usr/bin/python
# good luck setting up Pillow on your computer!
from PIL import Image
from PIL import ImageDraw
from random import randint
# width and height in pixels
SIZE = 200
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
doWork("string_param");
}
// Note the parameter variable name (i.e. string)
@markcerqueira
markcerqueira / FFRKItemIdParser.py
Last active August 29, 2015 14:19
Parses out item names and ids from the response to the party/list API
This file was migrated to: https://github.com/markcerqueira/ff-record-keeper
@markcerqueira
markcerqueira / gist:d4ec280f5c448d7ca45e
Last active August 29, 2015 14:19
Final Fantasy Record Keeper - API Analysis - dff/party/list
This file was migrated to: https://github.com/markcerqueira/ff-record-keeper
@markcerqueira
markcerqueira / gist:59cf24051f0ca404f66c
Last active August 29, 2015 14:19
Final Fantasy Record Keeper - API Analysis - battle/get_battle_init_data
This file was migrated to: https://github.com/markcerqueira/ff-record-keeper
@markcerqueira
markcerqueira / FFRKBattleDropParser.py
Last active August 29, 2015 14:19
Parses out item drops from battle/get_battle_init_data API
This file was migrated to: https://github.com/markcerqueira/ff-record-keeper