Skip to content

Instantly share code, notes, and snippets.

import Expo from 'expo';
import React from 'react';
import * as THREE from 'three';
import ExpoTHREE from 'expo-three';
console.disableYellowBox = true;
export default class App extends React.Component {
render() {

Keybase proof

I hereby claim:

  • I am burin on github.
  • I am burin (https://keybase.io/burin) on keybase.
  • I have a public key ASAjemSZEv5WsRPWD4RBz4lQU_pNgchSP6AB2Vm5ED4HNwo

To claim this, I am signing this object:

@burin
burin / presentations.md
Created April 20, 2016 15:45
Presentation Dark Patterns

The Skip Over

Having slides that look great when skipped over, but don't stand up to any scrutiny if used as an actual slide.

"oh this was for the exec team when we presented this to them over 3 hours. since we only have 1 hour for you plebes, we’ll skip over it. but we already presented it to execs and they gave it the thumbs up. "

The "I have time for questions at the end"

“i’ll have time for questions at the end, so hold on to that thought and if i haven’t answered it by the end...”

@burin
burin / gist:ab156df44fd313bb1b0a
Last active October 26, 2017 18:41
Squashing your commits into one commit without using interactive rebase.

Squashing your commits into one commit without using interactive rebase (https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request#squash-your-changes)

This basically takes the diff of your branch + origin/master and sets them aside for you to "recommit" them.

git fetch -ap # get in sync w/ server
git checkout jscs-disallow-redundant-spaces # switch to the appropriate branch
git reset --hard origin/jscs-disallow-redundant-spaces # get my branch to be exactly the same as what's on the server
MERGE_BASE=$(git merge-base origin/jscs-disallow-redundant-spaces origin/master) # get the commit where your branch originates
git reset --mixed $MERGE_BASE # reset to the point where your branch originates, but put your changes like you just made them
@burin
burin / gist:15722b69c81c508ba45f
Created July 10, 2015 17:46
Publishing a Pull Request
http://chris.beams.io/posts/git-commit/
https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request#squash-your-changes
# Background: https://twitter.com/burin/status/608303217999544322
# > i just went on a whitespace fixing binge. is there a way to combine my git diff w/ git blame to see whose code i fixed most?
#
# This downloads the git-diff-blame script, and sets it to be executable
# Then you can run the script and give it two commit hashes, ./git-diff-blame old new
curl https://raw.githubusercontent.com/toddlipcon/tlipcon-bin/master/git-diff-blame -O -L
chmod +x git-diff-blame
./git-diff-blame 56f00b4 b3aaee4
@burin
burin / util_extensions.swift
Last active August 29, 2015 14:17
How do i organize swift "utility" functions?
extension String {
func asTripDictionary() -> NSDictionary {
return ["wat":"wat"]
}
}
extension NSDate {
func asLocalISOString() -> String {
return "2015-03-12T13:24:00"
}
@burin
burin / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@burin
burin / .jscs.json
Last active August 29, 2015 14:00
Burin's JSCS Config
{
"excludeFiles": ["node_modules/**", "script/**", "wrapped/**", "mobile/libs/**"],
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireRightStickedOperators": ["!"],
"requireLeftStickedOperators": [","],
"disallowImplicitTypeConversion": ["string"],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,

Lately I've seen a lot of git commits that say:

Merge branch 'master' of http://git.labs.sabre.com/git/rails

Or while on a feature branch called add-toggle:

Merge branch 'add-toggle' of http://git.labs.sabre.com/git/rails

These are typically trivial merge commits that don't provide much value when going through the git log, so I'd prefer not to see them. You'll see them when using a visual tool like gitk or SourceTree, which I do pretty often throughout the day.