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 writer | |
import string_writer | |
pub fn main() { | |
string_writer.create() | |
|> writer.write("Text1") | |
|> writer.write("Text2") | |
|> string_writer.print() | |
} |
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
defmodule MyApp do | |
use Application | |
def start(_type, _args) do | |
import Supervisor.Spec, warn: false | |
children = [ | |
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [ | |
dispatch: dispatch | |
]) |
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
; Ruby has an awesome feature -- string interpolation. Read about it on the internet. | |
; On the other hand, Clojure only has cumbersome Java string formatting, which can not be | |
; used without pain after you've tried Ruby. | |
; So here's this simple macro that basically allows you to do most things you could do | |
; with Ruby string interpolation in Clojure. | |
(ns eis.stuff | |
(:require [clojure.string])) |
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
// ==UserScript== | |
// @name Delete youtube comments activity | |
// @version 1 | |
// @grant none | |
// @include https://myactivity.google.com/page* | |
// ==/UserScript== | |
const DELETE_MAX_ENTRIES_AFTER_PAGE_RELOAD = 1; | |
(function(d) { |
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.Reader (Reader, runReader, ReaderT(..), runReaderT, ask, class MonadAsk) | |
import Effect (Effect) | |
import Effect.Class (class MonadEffect, liftEffect) | |
import Effect.Console (log) | |
--------------------------------------------------------- |
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
-- an example of how to derive a show instance for a Maybe type | |
-- not totally sure why `derive instance showMyMaybe :: (Show a) => Show (MyMaybe a)` errors with... | |
-- error: CannotDerive : | |
-- Cannot derive a type class instance for Data.Show.Show (MyMaybe a) since instances of this type class are not derivable. | |
module Main where | |
import Prelude | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE, log) |
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 Text.ParserCombinators.Parsec | |
import Data.List | |
type Args = [String] | |
type Body = [String] | |
type Label = String | |
data JSONProp = JSONProp Label JSON deriving Show | |
data JSON = JSONObject [JSONProp] | |
| JSONNumber Double |
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
{- | |
Zachary Weaver <[email protected]> | |
JSONParser.hs | |
Version 0.1.1 | |
A simple example of parsing JSON with Parsec in haskell. Note that | |
since the primary point of this excersize is demonstration, | |
Text.Parsec.Token was avoided to expose more of the grammar. Also, | |
complicated optimizations and shorcuts were avoided (mostly). |
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 RAF where | |
import Prelude | |
import Data.Foldable (traverse_) | |
import Data.Maybe (Maybe(..)) | |
import Effect.Aff.Class (class MonadAff) | |
import Effect.Ref as Ref | |
import Halogen as H | |
import Halogen.HTML as HH |
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
100 MODE 1 | |
110 ORIGIN 320,200 | |
120 GREEN=9:BGREEN=18:BRED=6:BLACK=0 | |
130 INK 1,GREEN:INK 2,BGREEN:INK 3,BRED:INK 4,0 | |
140 DEG | |
150 SW=60:EW=240:ST=10 | |
160 R=190:FC=1 | |
170 GOSUB 300 | |
180 R=175:FC=2 | |
190 GOSUB 300 |
NewerOlder