I hereby claim:
- I am j-keck on github.
- I am jkeck (https://keybase.io/jkeck) on keybase.
- I have a public key ASCJGDzJpcMANJxwx6mzY2ac_APwI_PCEdQriQD0BFNATgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
with import <nixpkgs> {}; { | |
pyEnv = stdenv.mkDerivation { | |
name = "octave-kernel"; | |
buildInputs = [ python27Packages.pip python27Packages.virtualenv python27Packages.jupyter python27Packages.notebook octave gnuplot]; | |
shellHook = '' | |
if [ ! -d venv ] ; then | |
virtualenv venv | |
./venv/bin/pip install octave_kernel |
#!/usr/bin/env perl | |
# | |
# save systemd journal logs to a postgres instance | |
# | |
# | |
# * first run with '-init-db' to intialize the database | |
# * second run to load all logs | |
# (maybe with '-journalctl-args "-n 1000000"') | |
# * the following runs inserts only new log entries | |
# |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Exception (SomeException, try) | |
import Control.Lens | |
import qualified Data.ByteString.Lazy as BL | |
import Network.Connection (TLSSettings (..)) | |
import Network.HTTP.Client.TLS (mkManagerSettings) | |
import Network.Wreq |
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 j-keck <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
software and associated documentation files (the "Software"), to deal in the Software | |
without restriction, including without limitation the rights to use, copy, modify, | |
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to the following conditions: |
# tcpdump | |
* HTTP GET request | |
tcpdump -s 0 -A 'tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420' | |
* HTTP POST | |
tcpdump -s 0 -A 'tcp dst port 80 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)' | |
PROGRAMMING WITH EFFECTS | |
Graham Hutton, January 2014 | |
Shall we be pure or impure? | |
The functional programming community divides into two camps: | |
o "Pure" languages, such as Haskell, are based directly | |
upon the mathematical notion of a function as a | |
mapping from arguments to results. |
from: http://play.golang.org/p/P5DDZrcXZB | |
package main | |
import "fmt" | |
type Monad interface { | |
Bind(func(interface{}, Monad) Monad) Monad | |
Return(interface{}) Monad | |
} |
* print generated code: scala -Xprint:typer <scala file> | |
* compiler phases: scalac -Xshow-phases | |
* show generated code: scala -Xprint:<phases> (-Xprint:typer or -Xprint:1-14 or -Xprint:all) | |
* show generated code in gui: scala -Ybrowse:<phases> | |
scalac options in sbt [source](http://tpolecat.github.io/2014/04/11/scalac-flags.html): |