Skip to content

Instantly share code, notes, and snippets.

View talk.vimrc
" augroup reload_talk_vimrc
" autocmd!
" autocmd BufWritePost *.vimrc source ~/dev/talk.vimrc
" augroup END
" ================ General Config ================
set nocompatible
syntax enable
set encoding=utf-8
sebmarkbage / Enhance.js
Last active Feb 9, 2021
Higher-order Components
View Enhance.js
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
componentDidMount() {
this.setState({ data: 'Hello' });
render() {
View async-mocha.js
"use strict";
var Promise = require("bluebird");
describe("ES7 async functions in Mocha", function() {
it("are really cool!", async function(){
await Promise.delay(1000);
ThomasCrevoisier / ClojureScript_example
Created Dec 17, 2014
Simple example of ClojureScript
View ClojureScript_example
(defn hastalavistaify [xs]
(str "Hasta la vista " xs))
(hastalavistaify "Thomas") ;;; Outputs : "Hasta la vista Thomas"
(map hastalavistaify ["Thomas" "poney" "mutability"]) ;;; Outputs : ("Hasta la vista Thomas" "Hasta la vista poney" "Hasta la vista mutability")
btford /
Created Oct 30, 2014
Why you shouldn't worry so much about migrating with Angular

Several developers asked me about how difficult it will be to migrate Angular 1 to Angular 2. Angular 2 isn't done, so I legitimately have no idea how hard it will be. But there are a few high-level guiding principals in the design of Angular 1 that make adapting to changes like this fairly painless.

Angular 1 was designed so it would have a fairly minimal API surface. Let's look at controllers, since these are the meat of your app. Controllers are just functions that get passed other components as arguments:

MyController ($scope) {
  $scope.list = [];
  $scope.addItem = function (name) {
stefansundin /
Last active Jul 22, 2020
Git pre-push hook to prevent force pushing the master branch.
# This script will install a Git pre-push hook that prevents force pushing the master branch.
# Global installation instructions:
# mkdir $HOME/.githooks
# git config --global core.hooksPath $HOME/.githooks
# curl -fL -o $HOME/.githooks/pre-push
# chmod +x $HOME/.githooks/pre-push
# Uninstall:
# rm $HOME/.githooks/pre-push
zbabtkis / StyleCopier.js
Last active Dec 30, 2015
Utility function to copy rules from all stylesheets to another document
View StyleCopier.js
* Utility function to copy rules from all stylesheets to another document
* @author Zachary Babtkis <>
* @date December 4th 2013
* @License WTFPL
* copy styles
endolith / Has weird right-to-left characters.txt
Last active Feb 22, 2021
Unicode kaomoji smileys emoticons emoji
View Has weird right-to-left characters.txt