Skip to content

Instantly share code, notes, and snippets.

View LispyAriaro's full-sized avatar

Efe Ariaroo LispyAriaro

  • London, United Kingdom
View GitHub Profile
@rothgar
rothgar / get-book.sh
Created February 3, 2017 17:40
Download Google SRE book for offline reading
#!/bin/bash
wget -r -nc -p --html-extension -k -D google.com -np https://landing.google.com/sre/book/
@abhin4v
abhin4v / transformers.hs
Last active October 22, 2017 18:56
An exploration of Monad Transformers in Haskell
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module Transformers where
import Control.Applicative
import Control.Monad
import qualified Data.Char as Char
@joepie91
joepie91 / vpn.md
Last active May 20, 2024 03:37
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@davidallsopp
davidallsopp / ReaderMonad.hs
Created October 24, 2014 14:50
Simple example of the Reader Monad (in Haskell)
module ReaderMonad where
import Control.Monad.Reader
stuff :: Reader Int String
stuff = do
s <- ask
return (show s ++ " green bottles")
main :: IO ()
@cap10morgan
cap10morgan / async_geolocation.cljs
Created November 15, 2013 23:10
core.async HTML5 geolocation in ClojureScript
(ns cljs-minimal.core
(:require [cljs.core.async :as async :refer [put! <! >! <!! >!! chan]])
(:require-macros [cljs.core.async.macros :as m :refer [go]]))
(defn get-position []
(let [out (chan)
geo (.-geolocation js/navigator)]
(.getCurrentPosition geo (fn [pos] (put! out pos)))
out))
@egonSchiele
egonSchiele / reader.hs
Created June 10, 2013 20:51
Reader monad example
import Control.Monad.Reader
hello :: Reader String String
hello = do
name <- ask
return ("hello, " ++ name ++ "!")
bye :: Reader String String
bye = do
name <- ask
@mikehaertl
mikehaertl / gist:3258427
Created August 4, 2012 15:40
Learn you a Haskell - In a nutshell

Learn you a Haskell - In a nutshell

This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.


1. Introduction

  • Haskell is a functional programming language.
@stepankuzmin
stepankuzmin / geolocation.cljs
Created May 13, 2012 04:29
Geolocation using ClojureScript
(def urls (array "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png"
"http://b.tile.openstreetmap.org/${z}/${x}/${y}.png"
"http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"))
(def OSM (js/OpenLayers.Layer.XYZ. "OSM (with buffer)" urls (extend-object! (js-obj) {"transitionEffect" "resize"
"buffer" 2
"wrapDateLine" true
"sphericalMercator" true})))
(def plot (js/OpenLayers.Map. (extend-object! (js-obj) {"div" "plot"
@daveray
daveray / seesaw-repl-tutorial.clj
Created December 7, 2011 04:55
Seesaw REPL Tutorial
; A REPL-based, annotated Seesaw tutorial
; Please visit https://github.com/daveray/seesaw for more info
;
; This is a very basic intro to Seesaw, a Clojure UI toolkit. It covers
; Seesaw's basic features and philosophy, but only scratches the surface
; of what's available. It only assumes knowledge of Clojure. No Swing or
; Java experience is needed.
;
; This material was first presented in a talk at @CraftsmanGuild in
; Ann Arbor, MI.
@marcmo
marcmo / echoServer.hs
Created March 23, 2011 08:00
simple haskell program for sending over socket and receiving a response with a timeout
-- Echo server program
module Main where
import Control.Monad (unless,when)
import Network.Socket hiding (recv)
import qualified Data.ByteString as S
import Data.Word(Word8)
import Control.Concurrent(threadDelay)
import Data.List
import Numeric