Skip to content

Instantly share code, notes, and snippets.

@note89
note89 / .spacemacs
Created Jul 29, 2018
spacemacs conf
View .spacemacs
;; -*- 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
@note89
note89 / TigerToken.sol
Created Jun 19, 2018
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
View TigerToken.sol
pragma solidity ^0.4.18;
// ----------------------------------------------------------------------------
// 'bitfwd' CROWDSALE token contract
//
// Deployed to : 0xD0FDf2ECd4CadE671a7EE1063393eC0eB90816FD
// Symbol : GRR
// Name : Tiger Token
// Total supply: Gazillion
// Decimals : 0
View App.elm
processEvent : ERT.OutMsg -> Model -> ( Model, Cmd Msg )
processEvent msg model =
case msg of
ERT.OnNoOp ->
model ! []
ERT.ToPhx phxMsg ->
processPhxTwo (Phx2.toProcessPhx phxMsg Event) model
ERT.OnNavigate url ->
@note89
note89 / App->State.Elm
Last active Jul 19, 2016
Elm websockets controller
View App->State.Elm
module App.State exposing (..)
{-
We need the URL for the websocket. This will be the phoenix server url, then
the route for the socket, then "websocket" because that's the transport we're
communicating with.
-}
View KeyDown-Event-Decoder
onKeyUp : Json.Decoder Msg
onKeyUp =
Json.oneOf
[ logged "keyDecoder" keyDecoder
-- , charCodeDecoder -- only on keypress
, logged "keyCodeDecoder" keyCodeDecoder
, logged "whichDecoder" whichDecoder
, logged "keyIdentifierDecoder" keyIdentifierDecoder
, logged "charDecoder" charDecoder
]
@note89
note89 / nginxproxy.md
Created Mar 16, 2016 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@note89
note89 / introrx.md
Created Mar 1, 2016 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md