Skip to content

Instantly share code, notes, and snippets.

View jsscclr's full-sized avatar
🐈

Jessica Claire Edwards jsscclr

🐈
  • Sydney, Australia
View GitHub Profile
@jsscclr
jsscclr / readme.md
Created July 15, 2016 12:49 — forked from xem/readme.md
Maths & trigonometry cheat sheet for 2D games

Conventions

  • o = [xo = 0, yo = 0] is the origin
  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;

@jsscclr
jsscclr / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 23:04 — forked from anonymous/GAME_MASTER_v0_1.protobuf
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@jsscclr
jsscclr / anki_html.py
Created July 25, 2016 17:14 — forked from DrLulz/anki_html.py
Grab Q/A from HTML source and create Anki Cards directly.
#!/usr/local/bin/python
import os
import sys
import csv
from operator import itemgetter
from bs4 import BeautifulSoup
from anki import Collection as aopen
usmle_rx = open("/Users/drlulz/Desktop/test.html",'r').read()
@jsscclr
jsscclr / README.md
Created September 3, 2016 02:02 — forked from markusfisch/README.md
Convert Markdown files to simple web presentations

Markdown To Takahashi Presentation

[BASH][bash] script to create a single file [Takahashi][takahashi] web presentation from a [Markdown][markdown] document.

Dependencies

You'll need a [Markdown][markdown] converter named markdown in your

@jsscclr
jsscclr / Makefile
Created October 28, 2016 08:32 — forked from rgrove/Makefile
Simple Makefile to minify CSS and JS.
# Patterns matching CSS files that should be minified. Files with a -min.css
# suffix will be ignored.
CSS_FILES = $(filter-out %-min.css,$(wildcard \
public/css/*.css \
public/css/**/*.css \
))
# Patterns matching JS files that should be minified. Files with a -min.js
# suffix will be ignored.
JS_FILES = $(filter-out %-min.js,$(wildcard \
@jsscclr
jsscclr / Makefile
Created October 28, 2016 08:32 — forked from abackstrom/Makefile
CSS and JavaScript Minification/Compression Makefile
#
# css/js minification/compression makefile
#
#
# JS_TARGETS -- js files to minify/gzip
# CSS_TARGETS -- css files to minify/gzip
# CLEANUP -- additional files to delete during "make clean"
#
@jsscclr
jsscclr / Makefile
Created October 28, 2016 08:33 — forked from jordwest/Makefile
Simple front-end builds with Makefiles
# Specify directories under /client/src to be copied directly
COPYDIRS = lib img
client: copy client/build/js/app.js client/build/css/app.css
clean:
rm -Rf client/build
rebuild: clean client
@jsscclr
jsscclr / web-component.js
Created October 28, 2016 08:44 — forked from deebloo/web-component.js
A pattern for creating vanilla web components. no library. just a pattern I am rolling around.
(function () {
expose('createMyComponent', register, factory);
/**
* Exposes your new component to the window or to a module
*
* @param {string} name - the factory name to expose
* @param {function} definition - the definition of your web component. registers to the document
* @param {function} factory - method for programmatically creating web component
*/
@jsscclr
jsscclr / Makefile
Created October 29, 2016 03:19 — forked from ianblenke/Makefile
A Makefile for creating, updating, watching, and deleting a CloudFormation VPC as per gists 9f4b8dd2b39c7d1c31ef and 0a6a6f26d1ecaa0d81eb
STACK:=myapp-dev
TEMPLATE:=cloudformation-template_vpc-iam.json
PARAMETERS:=cloudformation-parameters_myapp-dev.json
AWS_REGION:=us-east-1
AWS_PROFILE:=aws-dev
all:
@which aws || pip install awscli
aws cloudformation create-stack --stack-name $(STACK) --template-body file://`pwd`/$(TEMPLATE) --parameters file://`pwd`/$(PARAMETERS) --capabilities CAPABILITY_IAM --profile $(AWS_PROFILE) --region $(AWS_REGION)