Skip to content

Instantly share code, notes, and snippets.

View kristoff3r's full-sized avatar

Kristoffer Søholm kristoff3r

View GitHub Profile
@kristoff3r
kristoff3r / Test.hs
Created April 4, 2018 15:01
Run with stack --resolver lts-11.1 ghci --package servant servant-server servant-lucid text network-uri
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
import Data.Monoid ((<>))
import qualified Data.Text as T
import Data.Text (Text)
import Network.URI (uriToString)
import Servant
(add-to-list 'load-path "/home/kris/git/lsp-haskell")
(add-to-list 'load-path "/home/kris/git/lsp-mode")
(add-to-list 'load-path "/home/kris/git/lsp-ui")
(with-eval-after-load 'lsp-mode
(require 'lsp-flycheck))
(require 'lsp-ui)
(add-hook 'lsp-mode-hook 'lsp-ui-mode)
(require 'lsp-haskell)
(add-hook 'haskell-mode-hook #'lsp-haskell-enable)
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.irssi;
irssi-config = pkgs.callPackage ../packages/irssi-config/default.nix {};
irssi-user = "irssi";
in
{ pkgs }:
{
packageOverrides = pkgs: rec {
portfolio = import /path/to/portfolio {
inherit (pkgs) stdenv fetchurl maven jdk jre;
};
};
}
#!/usr/bin/env python
from pwn import *
context(arch='i386', os='linux')
def cons(n):
return n & 0xffffffff
def rot(n,v):
# Positive is left
@kristoff3r
kristoff3r / keybase.md
Created September 28, 2014 11:43
Keybase proof

Keybase proof

I hereby claim:

  • I am kristoff3r on github.
  • I am kriztw (https://keybase.io/kriztw) on keybase.
  • I have a public key whose fingerprint is EAC7 D42E CAF7 60AD B7A9 E99D B480 DC71 CDCD 2B54

To claim this, I am signing this object:

#!/usr/bin/env python
from pwn import *
import time, sys
context('i386', 'linux')
# Useful addresses
gets = 0x08049376
bss = 0x08139d80 # This might be the .data section, we tried a few places and this works
mprotect = 0x80a56c0
@kristoff3r
kristoff3r / Make-output.txt
Created June 28, 2011 15:25
Attachment for mosml issue
cd config; sh autoconf gcc
Checking the sizes of integers and pointers...
Wow! A 64 bit architecture!
The char type is signed. Good!
This is a little-endian architecture.
This architecture has no alignment constraints.
Doubles can be word-aligned.
Function "memmove" is provided and handles overlapping moves correctly.
Function "bcopy" is provided and handles overlapping moves correctly.
_setjmp and _longjmp appear to work. Good!