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
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 / 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
@markcerqueira
markcerqueira / gist:400f3b6ac516690f72cd
Last active Sep 3, 2015
Nova Launcher (4.0.2) stack-trace after crash when adding a widget (Don't Keep Activities on)
View gist:400f3b6ac516690f72cd
09-07 23:49:00.139 31092-31092/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.teslacoilsw.launcher, PID: 31092
java.lang.RuntimeException: Unable to resume activity {com.teslacoilsw.launcher/com.teslacoilsw.launcher.NovaLauncher}: java.lang.NullPointerException: Attempt to invoke virtual method 'float[] o.eE.eN(int, int, float, float, float, float, float[])' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2986)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3017)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1347)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
@markcerqueira
markcerqueira / google_groups_csv_parser.py
Created Sep 8, 2015
"Parser" to print out only names and emails from Google Groups "Export Members" CSV file
View google_groups_csv_parser.py
# google_groups_csv_parse.py
# Author: Mark Cerqueira
#
# Strips out names and emails from Google Groups members list export
#
# 1. Download CSV from Export Members option in Google Groups
# 2. Name file stanfordkendo.csv and place in same directory as this script
# 3. Run it! e.g. $ python google_groups_csv_parser.py | pbcopy
import csv
@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) "
You can’t perform that action at this time.