Skip to content

Instantly share code, notes, and snippets.

View caseyyee's full-sized avatar
👀
Now in (( Stereo ))

Casey Yee caseyyee

👀
Now in (( Stereo ))
View GitHub Profile
@caseyyee
caseyyee / gist:d7457918730bce27863eb36424f9572a
Created August 26, 2019 17:47
JSX <Hide/> using styled-component and rebass.js
// https://gist.github.com/Kikobeats/0dbda3ec8154fa942dc47d36504681c6
import styled from "styled-components";
import theme from "./theme";
const { breakpoints } = theme;
const lastIndex = breakpoints.length - 1;
const getMediaBreakpoint = (breakpoints, breakpoint, index) => {
if (index === 0) return `@media screen and (max-width: ${breakpoint})`;
const prevBreakpoint = breakpoints[index - 1];
@caseyyee
caseyyee / gist:f9aa576b77dae57c6a00196c564d71a0
Created June 25, 2019 22:27
Push local .env to heroku environment variables.
heroku config:set $(cat .env.production | sed '/^$/d; /#[[:print:]]*$/d')
@caseyyee
caseyyee / gist:65bbdd9c282a7df19bbbdf6943c91a42
Created March 17, 2019 01:33 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@caseyyee
caseyyee / pr.md
Created November 9, 2018 22:27 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@caseyyee
caseyyee / gist:5f88b4b54b777d500b7ed552696d3ad5
Created April 19, 2017 20:20
A-Frame component - which-controller-present
// by: @machenmusik
AFRAME.registerComponent('which-controller-present', {
init: function () {
this.el.addEventListener('componentinitialized', (function (evt) {
if (evt.detail.name !== 'tracked-controls') { return; }
// Determine which, if any, higher level controller component says controllerPresent.
// WARNING! If a dummy tracked-controls instance is already present,
// then componentinitialized may not fire for true injection!
Object.keys(this.el.components).forEach((name) => {
@caseyyee
caseyyee / gist:116c44c100a9ac7844037cfd83dd9bae
Created April 13, 2017 20:23
three.js Gradient texture
//three.js r.62
var mesh, renderer, scene, camera, controls;
var t = 0, ambientFactor, canvas, textureImage;
init();
animate();
function init() {
@caseyyee
caseyyee / component.js
Created January 5, 2017 22:49
Extracting world coordinates from aframe entity
AFRAME.registerComponent('c-example', {
init: function () {
var mesh = new THREE.Mesh(new THREE.BoxGeometry( 1, 1, 1 ), new THREE.MeshLambertMaterial({color: 0xffff00}));
this.el.setObject3D('mesh', mesh);
this.calculatePosition();
},
calculatePosition: function () {
var mesh = this.el.object3D;
mesh.updateMatrixWorld();
@caseyyee
caseyyee / gist:8ad04bce89b1620917de
Created June 13, 2015 17:46
Error starting graphene on Windows
C:\Users\Casey\Developer\build\dist\bin>graphene.exe --start-manifest http://loc
alhost:8000 -f
JavaScript error: file:///C:/Users/Casey/Developer/build/dist/bin/components/Pro
cessGlobal.js, line 134: NS_ERROR_FILE_UNRECOGNIZED_PATH: Component returned fai
lure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]
*** UTM:SVC TimerManager:registerTimer - id: xpi-signature-verification
1434217537233 Marionette INFO Marionette enabled via build flag and pr
ef
[CAPI] LibOVR module is located at C:\Windows\SYSTEM32\LibOVRRT32_0_5.dll
@caseyyee
caseyyee / gist:c8ea6e38d9919d3a5055
Created June 11, 2015 23:32
mozconfig for horizon
. "$topsrcdir/b2g/config/mozconfigs/common"
MOZ_HORIZON=1
mk_add_options MOZ_OBJDIR=../build
mk_add_options MOZ_MAKE_FLAGS="-j9 -s"
ac_add_options --disable-libjpeg-turbo
# This option is required if you want to be able to run Gaia's tests