Skip to content

Instantly share code, notes, and snippets.

View gleenn's full-sized avatar
💭
Yup

Glenn Jahnke gleenn

💭
Yup
  • San Diego, California
View GitHub Profile
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@d-t-w
d-t-w / gist:a239dfca4f57b7ff6f38c895b7f45405
Created February 27, 2021 22:21
Intellij Cursive+Cljfmt Editor CodeStyle
<code_scheme name="TW" version="173">
<ClojureCodeStyleSettings>{
:cljs.core/as-&gt; :only-indent
:cljs.core/assoc 0
:cljs.core/cond-&gt; :only-indent
:cljs.core/cond-&gt;&gt; :only-indent
:cljs.core/defonce :only-indent
:cljs.core/with-meta :only-indent
:cljs.core.async/go :only-indent
:cljs.core.async/go-loop :only-indent
; https://gist.github.com/munificent/b1bcd969063da3e6c298be070a22b604
(ns dgn)
(def H 40)
(def W 80)
(def TV " ")
(def TF ".")
(def TW "#")
(def TC "!")
(def TOD "\\")
@JCGrant
JCGrant / README.md
Created November 25, 2018 20:59
Code from "Typing the technical interview" by Kyle "Aphyr" Kingsbury - https://aphyr.com/posts/342-typing-the-technical-interview

Typing the technical interview

Originally written by Kyle "Aphyr" Kingsbury

Definitely check out the awesome blog post where this code originated. It's well worth the read!

To run:

$ ghci Solution.hs

*Main> :type solution (nil :: N6)

@andyrbell
andyrbell / scanner.sh
Last active November 3, 2024 13:42
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@honza
honza / description.md
Last active January 4, 2022 00:54
Ranking algorithm - Lower bound of Wilson score confidence interval for a Bernoulli parameter All implementations use 95% probability.

Ranking algorithm

Lower bound of Wilson score confidence interval for a Bernoulli parameter

All implementations use 95% probability.

pos is the number of positive votes, n is the total number of votes.

Source