Skip to content

Instantly share code, notes, and snippets.

agum onkey agumonkey

  • NONE
  • Dark side of the moon @ ['tkf8-2-1', 'ay21-3', '3263-827']
Block or report user

Report or block agumonkey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
scottlinux / breachcompilation.txt
Created Dec 19, 2017
1.4 billion password breach compilation wordlist
View breachcompilation.txt
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
Last active Oct 22, 2019
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync

Boot from USB and set prepare system

loadkeys <your-keymap>
anonymous / nested-cont.scm
Created Aug 18, 2016
nested continuations are tricky (see Alan Bawden)
View nested-cont.scm
(define (cc k) (call-with-current-continuation k))
(display (format ">>> ~s\n" (- 10 (cc (lambda (k) (+ 1 (+ 2 (k 10))))))))
(let ((k (cc (lambda (bind) (lambda (x) (+ 1 (cc (lambda (k) (bind k))))))))) (k 10))
(let ((k (cc (lambda (bind)
(lambda (x)
(+ 1 (cc (lambda (k)
(bind k)))))))))
(k 10))
View arithmetic-puzzle-solver.rkt
#lang racket
;; A solver for the following puzzle:
;; Given 5 integers a, b, c, d, and e,
;; find an expression that combines a, b, c, and d with arithmetic operations (+, -, *, and /) to get e.
(require srfi/1)
(define ops '(+ - * /))
View emacs-local.el
(defun remote-shell-fav-hosts-get ()
"My hook to the remote-shell processes in order to connect to
my OpenStack controller, and create a hashtable of host names as
the keys, and IP addresses as the values."
;; Run nova list command remotely on this host system, and put the
;; results in a temp buffer:
(let* ((undercloud-controller "")
(default-directory (format "/ssh:%s:" undercloud-controller))
View NQueen.scala
* Solves the n-Queen puzzle in O(n!)
* Let p[r] be the column of the queen on the rth row (must be exactly 1 queen per row)
* There also must be exactly 1 queen per column and hence p must be a permuation of (0 until n)
* There must be n distinct (col + diag) and n distinct (col - diag) for each queen (else bishop attacks)
* @return Vector p of length n such that p[i] is the column of the queen on the ith row in a solution
def nQueens(n: Int) = (0 until n).permutations filter {p =>
p.zipWithIndex.flatMap{case (c, d) => Seq(n + c + d, c - d)}.distinct.size == 2*n
floriandejonckheere / 40_iso.cfg
Created Sep 29, 2015
GRUB entry for booting Arch Linux ISO
View 40_iso.cfg
# This entry boots an Antergos (Arch) Linux ISO straight from disk.
# LVM is not supported because the lvm module is not loaded in Antergos initrd
menuentry "Antergos Minimal ISO 2015-09-13" {
insmod part_gpt
insmod lvm
insmod loopback
set root=(hd0,0)
set isofile=/antergos.iso
search --no-floppy --file ${isofile} --set
Last active Jul 4, 2019
Persistent pipes/circular buffers for Linux

📂 Persistent "pipes" in Linux

In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.

AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist

mindplay-dk /
Last active Oct 22, 2019
Complete overview of the PHP SessionHandler life-cycle

This page provides a full overview of PHP's SessionHandler life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and what you can expect will be called in your custom SessionHandler implementation.

Each example is a separate script being run by a client with cookies enabled.

To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().

Pysis868 / grub.cfg
Last active Oct 18, 2019
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others. Exceedingly long blog post:…
View grub.cfg
# Config for GNU GRand Unified Bootloader (GRUB) (2)
# /boot/grub/grub.cfg
# or
# /boot/grub2/grub.cfg
# This grub.cfg file was created by Lance
# Suggested Entries and the suggestor, if available, will also be noted.
# and then improved by Pysis.
You can’t perform that action at this time.