This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# New Github repo | |
# ----------------------------- | |
# Make sure to replace the "USERNAME" portion with your own | |
# GitHub username. To start a new public GitHub repo, | |
# simply do this from your command line: | |
# newgh REPO_NAME | |
function newgithub(){ | |
curl -u 'USERNAME' https://api.github.com/user/repos -d "{\"name\":\"$1\"}"; | |
git init; | |
git remote add origin [email protected]:USERNAME/$1.git; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is how you might traditionally bind component | |
// functions to make sure you're accessing the right scope | |
class OldButton extends React.Component { | |
handleClick (e){ /* ... */ } | |
render() { | |
return <button onClick={this.handleClick.bind(this)} />; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build appengine | |
package main | |
import ( | |
"github.com/labstack/echo" | |
"github.com/mjibson/appstats" | |
"golang.org/x/net/context" | |
"net/http" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// EaselJS still has some problems compiling with Webpack/CommonJS as of this | |
// publishing (01/23/2016), which makes it difficult to write modularity | |
// in ES6 for it. However, it's not that hard to work around: | |
import { Car, Mustang } from './Cars'; | |
let createjs = window.createjs; // local reference to createjs and bypasses the current module issues | |
let stage = new createjs.Stage('car_canvas'); | |
let car = new Car({ | |
color: '#0081c9', | |
id: 'car1', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The basic idea is to add one more template tag to Vue-Loader's interpreter: | |
<styleguide lang="markdown"> | |
This area would allow virtually any kind of markdown text, comments, etc. | |
</styleguide> | |
<template> | |
// ... | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# source iterm2.zsh | |
# iTerm2 window/tab color commands | |
# Requires iTerm2 >= Build 1.0.0.20110804 | |
# http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes | |
tab-color() { | |
echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
echo -ne "\033]6;1;bg;green;brightness;$2\a" | |
echo -ne "\033]6;1;bg;blue;brightness;$3\a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from "vue"; | |
import createAuth0Client from "@auth0/auth0-spa-js"; | |
/** Define a default action to perform after authentication */ | |
const DEFAULT_REDIRECT_CALLBACK = () => | |
window.history.replaceState({}, document.title, window.location.pathname); | |
let instance; | |
/** Returns the current instance of the SDK */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import createAuth0Client from '@auth0/auth0-spa-js' | |
import { computed, reactive, watchEffect } from 'vue' | |
let client | |
const state = reactive({ | |
loading: true, | |
isAuthenticated: false, | |
user: {}, | |
popupOpen: false, | |
error: null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
OlderNewer