View buy-now-snes-classic.rb
require 'net/http'
require 'twilio-ruby'
require 'uri'
account_sid = 'SID'
auth_token = 'TOKEN'
@client = Twilio::REST::Client.new account_sid, auth_token
def notify!
View logic.hs
let true = \x y -> x
let false = \x y -> y
let interpret b = b "TRUE" "FALSE"
let and a b = a b false
let or a b = a true b
interpret true %% "TRUE"
interpret false %% "FALSE"
interpret $ and true true %% "TRUE"
interpret $ and false true %% "FALSE"
View Main.elm
-- CO: https://ellie-app.com/3YJ65RSsjGRa1/1
module Main exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html exposing (..)
import Json.Decode as Decode
import Time exposing (Time)
View Main.elm
-- https://ellie-app.com/3XKKySvspDka1/0
module Main exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html exposing (..)
import Json.Decode as Decode
import Task
import Time
View ext.elm
module Main exposing (..)
import Html exposing (Html, text)
type alias Named a = { a | name : String }
foo : Compound -> String
foo named = named.name ++ "!"
type alias Position r = { r | x:Float }
View elm_sprockets.rb
# Elm integration for Sprockets 3.x (Rails 4.2)
#
# Revised version of a Sprockets 3.x processor for Elm. It supports
# dependencies. One little quirk is that only .js.elm files are
# requireable in application.js.
#
# How to use it?
#
# Put this file in your config/initializers/ and create
# app/assets/javascripts/MyModule.js.elm and require it in your
View gist:3344bea37b0844915693d75826705586
#!/usr/bin/env stack
{- stack runghc
--resolver lts-7
--install-ghc
--package QuickCheck
--package checkers
-}
-- CO: https://www.reddit.com/r/HaskellBook/comments/5p2aka/tip_for_quickchecking_typeclass_instances/
View fizzbuzz.hs
fizz :: Integer -> String
fizz n = if ((n `mod` 3) == 0)
then "fizz"
else ""
buzz :: Integer -> String
buzz n = if ((n `mod` 5) == 0)
then "buzz"
else ""
View demo.vim
" http://andrewvos.com/writing-async-jobs-in-vim-8
function! BackgroundCommandClose(channel)
execute "cfile! " . g:backgroundCommandOutput
copen
unlet g:backgroundCommandOutput
endfunction
function! RunBackgroundCommand(command)
if !exists('g:backgroundCommandOutput')
View gist:8dc54cbc95ded2b52a61bf9405b2d52b
git clone git@github.com:vim/vim.git ~/vim
sudo apt-get remove vim
cd ~/vim
sudo make distclean
./configure --with-features=huge\
--enable-multibyte\
--enable-rubyinterp=yes
--enable-pythoninterp=yes
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu #non-standard!
--enable-python3interp=yes