⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 Control.Monad.Except.Trans | |
import Data.HTTP.Method | |
import Network.HTTP.Affjax | |
import Network.HTTP.ResponseHeader | |
import Network.HTTP.StatusCode | |
import Prelude | |
import Control.Plus | |
import Control.Monad.Aff.Console (log) | |
import Control.Monad.Eff.Class (liftEff) |
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
exports.create = function () { | |
var subs = []; | |
return { | |
event: function(sub) { | |
subs.push(sub); | |
}, | |
push: function(a) { | |
return function() { | |
for (var i = 0; i < subs.length; i++) { | |
subs[i](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
exports.inp1 = function(sub) { | |
var count = 0; | |
var b = document.querySelector("body"); | |
b.addEventListener("click", function() { | |
sub(count + ""); | |
count ++ ; | |
}); |
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
data Options = Local | Seasonal | LongDistance | |
foreign import showUI :: forall eff. (Option -> Eff eff Options) | |
main = do | |
options <- showUI Local | |
case options of | |
Local -> log "local" | |
Seasonal -> log "Seasonal" | |
LongDistance -> log "LongDistance" |
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 where | |
import Prelude | |
import Control.Monad.Eff.Class | |
import Network.HTTP.StatusCode | |
import Network.HTTP.Affjax as Ajax | |
import Control.Monad.Aff (Aff, Canceler(..), attempt, launchAff, makeAff) | |
import Control.Monad.Aff.Console (CONSOLE, log) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Exception ( Error, try) |
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 where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Class | |
import Control.Monad.Aff (launchAff, Aff, makeAff, attempt) | |
import Control.Monad.Aff.Console (CONSOLE, log) | |
import Control.Monad.Eff.Exception (Error, try) | |
import Network.HTTP.Affjax as Ajax | |
import Network.HTTP.StatusCode |
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 where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Class | |
import Control.Monad.Aff (launchAff, Aff, makeAff, attempt) | |
import Control.Monad.Aff.Console (CONSOLE, log) | |
import Control.Monad.Eff.Exception (Error, try) | |
import Network.HTTP.Affjax as Ajax | |
import Data.Either (Either(..), either) |
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
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |
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
var ChatAppDispatcher = require('../dispatcher/ChatAppDispatcher'); | |
var ChatConstants = require('../constants/ChatConstants'); | |
var ChatMessageUtils = require('../utils/ChatMessageUtils'); | |
var EventEmitter = require('events').EventEmitter; | |
var ThreadStore = require('../stores/ThreadStore'); | |
var merge = require('react/lib/merge'); | |
var ActionTypes = ChatConstants.ActionTypes; | |
var CHANGE_EVENT = 'change'; |
NewerOlder