Skip to content

Instantly share code, notes, and snippets.

View LispyAriaro's full-sized avatar

Efe Ariaroo LispyAriaro

  • London, United Kingdom
View GitHub Profile
@LispyAriaro
LispyAriaro / reader.hs
Created December 31, 2017 23:23 — forked from egonSchiele/reader.hs
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
@LispyAriaro
LispyAriaro / ReaderMonad.hs
Created December 31, 2017 23:23 — forked from davidallsopp/ReaderMonad.hs
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 ()
@LispyAriaro
LispyAriaro / bloom.py
Created December 15, 2017 19:46 — forked from marcan/bloom.py
Simple Bloom filter implementation in Python 3 (for use with the HIBP password list)
#!/usr/bin/python3
#
# Simple Bloom filter implementation in Python 3
# Copyright 2017 Hector Martin "marcan" <[email protected]>
# Licensed under the terms of the MIT license
#
# Written to be used with the Have I been pwned? password list:
# https://haveibeenpwned.com/passwords
#
# Download the pre-computed filter here (629MB, k=11, false positive p=0.0005):
@LispyAriaro
LispyAriaro / transformers.hs
Created October 22, 2017 18:56 — forked from abhin4v/transformers.hs
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
@LispyAriaro
LispyAriaro / BootstrapService.cs
Created April 6, 2017 02:13 — forked from KevM/BootstrapService.cs
Example configuration of Topshelf to turn an console application into a Windows service
public class BootstrapService : ServiceControl
{
private readonly HostSettings _settings;
private Container _container;
private CaseMonitor _monitor;
public BootstrapService(HostSettings settings)
{
_settings = settings;
}
@LispyAriaro
LispyAriaro / gist:8dc6218f9690c9ca03739b17e8865725
Created February 3, 2017 23:06 — forked from mikehaertl/gist:3258427
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.
@LispyAriaro
LispyAriaro / .profile
Created December 23, 2016 04:39 — forked from pyykkis/.profile
Ubuntu 10.10 default profile file
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@LispyAriaro
LispyAriaro / .bashrc
Created December 23, 2016 04:39 — forked from marioBonales/.bashrc
Default .bashrc for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@LispyAriaro
LispyAriaro / gist:442c16246dc2de465b4e532264369cce
Created October 20, 2016 02:44 — forked from segebee/gist:7dde9de8e70a207e6e19
Nigeria States and Local Government Areas JSON - codingsavvy.com
[{"state":{"name":"Abia State","id":1,"locals":[{"name":"Aba South","id":1},{"name":"Arochukwu","id":2},{"name":"Bende","id":3},{"name":"Ikwuano","id":4},{"name":"Isiala Ngwa North","id":5},{"name":"Isiala Ngwa South","id":6},{"name":"Isuikwuato","id":7},{"name":"Obi Ngwa","id":8},{"name":"Ohafia","id":9},{"name":"Osisioma","id":10},{"name":"Ugwunagbo","id":11},{"name":"Ukwa East","id":12},{"name":"Ukwa West","id":13},{"name":"Umuahia North","id":14},{"name":"Umuahia South","id":15},{"name":"Umu Nneochi","id":16}]}},{"state":{"name":"Adamawa State","id":2,"locals":[{"name":"Fufure","id":1},{"name":"Ganye","id":2},{"name":"Gayuk","id":3},{"name":"Gombi","id":4},{"name":"Grie","id":5},{"name":"Hong","id":6},{"name":"Jada","id":7},{"name":"Lamurde","id":8},{"name":"Madagali","id":9},{"name":"Maiha","id":10},{"name":"Mayo Belwa","id":11},{"name":"Michika","id":12},{"name":"Mubi North","id":13},{"name":"Mubi South","id":14},{"name":"Numan","id":15},{"name":"Shelleng","id":16},{"name":"Song","id":17},{"name":"Toung
@LispyAriaro
LispyAriaro / gist:107a8b9e7de116fc47c2ac1a5789a5fc
Created July 6, 2016 20:33
Google Contacts API v3 Javascript sample
<html>
<head>
<script src="https://apis.google.com/js/client.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>
function auth() {
var config = {
'client_id': 'OAUTH_CLIENT_ID',
'scope': 'https://www.google.com/m8/feeds'
};