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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Elm Crystal Chat Proof of Concept</title> | |
<script src="elm.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
const websocketProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:'; |
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
'use strict'; | |
const doc = require('dynamodb-doc'); | |
const dynamo = new doc.DynamoDB(); | |
const Q = require('kew'); | |
module.exports.handler = (event, context, callback) => { | |
function putItem() { | |
const defer = Q.defer(); |
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
-- DungeonGenerator.elm | |
clean : Model -> Model | |
clean ({ rooms, corridors, activePoints } as 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
Tick time -> | |
if time |> inSeconds |> isMultipleOfThree then | |
let | |
( nextLine, nextModel ) = | |
nextLineAndCycleList model | |
in | |
nextModel ! [ Navigation.modifyUrl nextLine ] | |
else | |
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
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update msg model = | |
case msg of | |
UrlChange location -> | |
let | |
( nextPhrase, nextPhrases ) = | |
nextLineAndCycleList model.phrases | |
in | |
{ model | |
| location = location |
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
query { | |
user (login: "martimatix") { | |
name | |
repositories (first: 5, orderBy: { field: UPDATED_AT, direction: DESC }) { | |
pageInfo { | |
hasNextPage | |
endCursor | |
} | |
edges { | |
node { |
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
# This backwards approach wouldn't work because things like `let` and `do` would seem unnatural. | |
Fauna | |
.index('all_things_random_and_ref') | |
.match | |
.paginate(size: size, after: after) | |
.select('data') | |
.map { |_, ref| ref.get } | |
.query |
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
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/martimatix/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" | |
plugins=(git) |
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 (main) | |
import Graphqelm.Operation exposing (RootQuery) | |
import Graphqelm.Http | |
import Graphqelm.SelectionSet exposing (SelectionSet, with) | |
import Html exposing (Html, a, div, h1, h2, p, pre, text) | |
import RemoteData exposing (RemoteData) | |
import Github.Object | |
import Github.Object.User as User | |
import Github.Query as Query |
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
#!/bin/bash | |
echo "determining branch" | |
branch=`git branch | sed -e s/^\.\ // | grep $1` | |
echo "checking out $branch" | |
git checkout $branch |