Skip to content

Instantly share code, notes, and snippets.

View iomonad's full-sized avatar
🍋
λ

iomonad iomonad

🍋
λ
  • 12:13 (UTC +03:00)
View GitHub Profile
@iomonad
iomonad / google-dorks
Created August 3, 2018 12:06 — forked from stevenswafford/google-dorks
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@iomonad
iomonad / README
Created August 14, 2018 07:04
Binge - curses client for transmission-daemon
Binge
=====
Another curses client for transmission-daemon. Not fully featured,
but sufficient for my daily torrents. Minimal and experimental.
Screenshot: http://i.imgur.com/2X82oyS.png
Dependencies
============
@iomonad
iomonad / OAuth2.hs
Created September 14, 2018 11:31 — forked from qzchenwl/OAuth2.hs
Simple oauth2.0 implementation in Haskell
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
import Data.Aeson
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as BSL
import Data.ByteString.Lazy (toChunks)
import Data.List
import Data.Maybe
import Data.Typeable (Typeable)
@iomonad
iomonad / SimplePartitionSample.scala
Created November 5, 2018 13:50 — forked from johanandren/SimplePartitionSample.scala
Sample of using partition to split up incoming elements over multiple outgoing streams
import akka.actor.ActorSystem
import akka.stream._
import akka.stream.scaladsl._
import scala.io.StdIn
import scala.util.Random
object SimplePartitionSample extends App {
implicit val system = ActorSystem()
@iomonad
iomonad / PassThroughFlow.scala
Created November 5, 2018 14:39 — forked from davideicardi/PassThroughFlow.scala
Akka stream generic pass through flow. For latest implementation see https://developer.lightbend.com/docs/alpakka/current/patterns.html#passthrough
/*
https://scalafiddle.io/sf/sniohcZ/1
Use PassThroughFlow when you have a message that should be used in a
flow that trasform it but you want to maintain the original message for
another following flow.
For example if you consume messages from Kafka (CommittableMessage).
You process the message (transform, save it inside a database, ...) and then you need again the original message
to commit the offset.
package alwyzon.irc
/*
<message> ::= [':' <prefix> <SPACE> ] <command> <params> <crlf>
<prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
<command> ::= <letter> { <letter> } | <number> <number> <number>
<SPACE> ::= ' ' { ' ' }
<params> ::= <SPACE> [ ':' <trailing> | <middle> <params> ]
<middle> ::= <Any *non-empty* sequence of octets not including SPACE or NUL or CR or LF, the first of which may not be ':'>
<trailing> ::= <Any, possibly *empty*, sequence of octets not including NUL or CR or LF>

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@iomonad
iomonad / happyeyeballs.clj
Last active February 22, 2019 14:31 — forked from leonoel/deps.edn
happy eyeballs
(ns happyeyeballs
(:require [missionary.core :as m])
(:import (java.net InetAddress InetSocketAddress)
(java.nio.channels AsynchronousSocketChannel CompletionHandler)
(java.util.concurrent.atomic AtomicBoolean)))
(defn happyeyeballs
"Tries to establish a connection to a host associated with multiple endpoints, following the Happy Eyeballs protocol.
Given a sequence of tasks performing the connection to each endpoint, returns a task sequentially performing connection
@iomonad
iomonad / gist:a8a6a3b029bd9ea2400c807e4dac7952
Created October 8, 2019 13:51 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@iomonad
iomonad / gist:69c91e51175382ea607c097ee390d566
Created March 26, 2020 17:27 — forked from chrisdone/gist:02e165a0004be33734ac2334f215380e
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel