Skip to content

Instantly share code, notes, and snippets.

💜
Join me! Twitch is hiring!

Mark Cerqueira markcerqueira

💜
Join me! Twitch is hiring!
Block or report user

Report or block markcerqueira

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@markcerqueira
markcerqueira / .git_bash
Last active Dec 14, 2015
Useful git branch stuff for your bash_profile
View .git_bash
# 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) "
View gist:9796025
### 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 Mar 31, 2014
CrashPlan and the Mac library folder
View gist:9902072
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 Jan 11, 2015
Crittercism Auto-Upload dSYM with API Key as an environmental variable
View xcode_build_phase.sh
# 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 Aug 29, 2015
A Python script to generate HUGE images
View imggen.py
#!/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
View 0 - MainActivity.java
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 Aug 29, 2015
Parses out item names and ids from the response to the party/list API
View FFRKItemIdParser.py
This file was migrated to: https://github.com/markcerqueira/ff-record-keeper
@markcerqueira
markcerqueira / gist:d4ec280f5c448d7ca45e
Last active Aug 29, 2015
Final Fantasy Record Keeper - API Analysis - dff/party/list
View gist:d4ec280f5c448d7ca45e
This file was migrated to: https://github.com/markcerqueira/ff-record-keeper
@markcerqueira
markcerqueira / gist:59cf24051f0ca404f66c
Last active Aug 29, 2015
Final Fantasy Record Keeper - API Analysis - battle/get_battle_init_data
View gist:59cf24051f0ca404f66c
This file was migrated to: https://github.com/markcerqueira/ff-record-keeper
@markcerqueira
markcerqueira / FFRKBattleDropParser.py
Last active Aug 29, 2015
Parses out item drops from battle/get_battle_init_data API
View FFRKBattleDropParser.py
This file was migrated to: https://github.com/markcerqueira/ff-record-keeper
You can’t perform that action at this time.