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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import Http | |
import Json.Decode as Decode | |
type alias Model = |
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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Events exposing (onClick) | |
import Http | |
import Json.Decode as Decode | |
main : Program Never Model Msg | |
main = |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
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
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
" ------------------------------------ | |
" Theme | |
" ------------------------------------ |
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
# cat << EOF > /dev/null | |
# https://github.com/gpakosz/.tmux | |
# (‑●‑●)> released under the WTFPL v2 license, by Gregory Pakosz (@gpakosz) | |
# /!\ do not edit this file | |
# instead, override settings in ~/.tmux.conf.local | |
# -- general ------------------------------------------------------------------- | |
set -g default-terminal "screen-256color" # colors! |
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
// Binding in Constructor, this is the currently recommended method in the React documentation and what I'm used to using | |
// It can look kinda bad if you use a lot of them, BUT it does keep the render method clean and avoid repetition of binding | |
class Component extends React.Component<any, any> { | |
constructor(props) { | |
super(props) | |
this.state = { | |
bool: false | |
} | |
this.handleFunction = this.handleFunction.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
import * as sut from './index1' | |
import * as sinon from 'sinon' | |
import { expect } from 'chai' | |
describe('_saveAndProcessPayload', () => { | |
it('will return a formatted API payload', () => { | |
const mockPayload = [ | |
{ name: 'name1', value: 'value1' }, | |
{ name: 'name2', value: 'value2' }, | |
] |
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 * as api from 'whatever' | |
import * as R from 'ramda' | |
interface ReturnPayload { | |
name: string, | |
value: string | |
} | |
export function _saveAndProcessReturn(apiDep, payload) { | |
const saveReturn: ReturnPayload[] = apiDep.save('Route', payload) |
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 * as api from 'whatever' | |
interface ReturnPayload { | |
name: string, | |
value: string | |
} | |
export function saveAndProcessReturn(payload) { | |
const saveReturn: ReturnPayload[] = api.save('Route', payload) |
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
set -g default-terminal "xterm-256color" | |
run '~/.tmux/plugins/tpm/tpm' | |
unbind C-b | |
set -g prefix C-a | |
bind C-a send-prefix |