This file contains hidden or 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 React from 'react'; | |
import PubSub from 'pubsub-js'; | |
import { configure, shallow } from 'enzyme'; | |
import Adapter from 'enzyme-adapter-react-16'; | |
configure({ adapter: new Adapter() }); | |
import Thing from './thing'; | |
describe('thing', () => { |
This file contains hidden or 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 React from 'react'; | |
import PubSub from 'pubsub-js'; | |
export default class Thing extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
componentDidMount() { | |
PubSub.publish('thing.did.mount'); |
This file contains hidden or 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
{ | |
"files.trimTrailingWhitespace": true, | |
"files.insertFinalNewline": true, | |
"editor.fontSize": 14, | |
"editor.fontLigatures": true, | |
"editor.fontFamily": "Fira Code, Menlo, Monaco, 'Courier New', monospace", | |
"editor.tabSize": 2, | |
"editor.formatOnSave": true, | |
"editor.formatOnPaste": true, | |
"editor.minimap.enabled": false, |
This file contains hidden or 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
;; -*- mode: emacs-lisp -*- | |
(defun dotspacemacs/layers () | |
(setq-default | |
dotspacemacs-distribution 'spacemacs | |
dotspacemacs-enable-lazy-installation 'unused | |
dotspacemacs-ask-for-lazy-installation t | |
dotspacemacs-configuration-layer-path '() | |
dotspacemacs-configuration-layers | |
'( |
This file contains hidden or 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
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
" look and style |
This file contains hidden or 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 official instructions and blog posts are out of date and the url they suggest goes to a 404 page no | |
# so here is something more upto date | |
# all credit to @likethesky who's gist this was based on. | |
# update and install deps | |
brew update && brew doctor | |
brew install postgresql | |
brew install elixir | |
mix local.hex |
This file contains hidden or 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 file is not transpiled through babel and some installs of node are v0.x */ | |
/* eslint-disable no-console, no-var, prefer-template */ | |
// 3rd party modules | |
var path = require('path'); | |
var webpack = require('webpack'); | |
var HappyPack = require('happypack'); | |
// implementation | |
var buildMode = process.env.NODE_ENV || 'production'; |
This file contains hidden or 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
chrome.runtime.onMessageExternal.addListener(function(request, sender, sendResponse) { | |
console.log('incomming'); | |
if (request.getTargetData){ | |
console.log('We have target data'); | |
sendResponse({targetData: {}}); | |
} else { | |
if (request.activateLasers) { | |
var success = true; | |
console.log('lazers active'); | |
sendResponse({activateLasers: success}); |
This file contains hidden or 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
Show hidden characters
{ | |
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme", | |
"fade_fold_buttons": false, | |
"font_face": "Source Code Pro", | |
"font_size": 11, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"JavaScript", | |
"Vintage" |
This file contains hidden or 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
(function (agent) { | |
var whiteList = { // example of a whitelist. browser name/version and a UA substring | |
"firefox31" : "Firefox/31.0", | |
"IE10" : "MSIE 10.0", | |
"chrome37" : "Chrome/37", | |
"chrome38" : "Chrome/38", | |
"chrome39" : "Chrome/39" | |
}, validBrowser = false; | |
for(var browser in whiteList){ |