Skip to content

Instantly share code, notes, and snippets.

View hauleth's full-sized avatar
⌨️
Click! Clack!

Łukasz Jan Niemier hauleth

⌨️
Click! Clack!
View GitHub Profile
@hauleth
hauleth / asyncdo.vim
Created November 5, 2017 14:27
Minimal async runner
func! s:populate(file, cmd) abort
unlet! t:job
try
exe 'cgetfile '.a:file
finally
call setqflist([], 'a', {'title': a:cmd})
endtry
endfunc
func! AsyncDo(...) abort
@hauleth
hauleth / sudo_lecture
Created October 14, 2017 19:05
Sudo lecture
 ╓▄≡≡▄╖
 ╓▀ ⸜⏋⎾⸝ ▀╖
 ,▓⸜▚▃`´▃▞⸝▓,
 █  `⸜▀▀⸝´  █
 . ▓▐  ∕≡≡∖  ▌▓ .
 #⌉'╯ ║▌  ∣≡≡∣  ▐║ ╰'⌠#
 ¬"  ▐V  ▀▄_∕≡≡∖_▄▀ V▌ "⌐
 w╜ ▐▄ ,:« "▀▀▀▀" »:, ▄▌ ╙w
 ▐╖▄▄▄▄²▌^ ▐ ▌ ^▌²▄▄▄▄╓▌
 ▐╡W▐║ ▐  / ,, \  ▐ ║▌W╞▌
## Build
build:
stage: build
tags:
- elixir
script:
- eval $(ssh-agent -s)
- echo "$SSH_BUILD_KEY" | tr -d '\r' | ssh-add -
- git branch -f master HEAD
- mix edeliver build release --revision="$CI_BUILD_REF" --auto-version=revision
### Keybase proof
I hereby claim:
* I am hauleth on github.
* I am hauleth (https://keybase.io/hauleth) on keybase.
* I have a public key ASC0dZl_5-9qDXYdx41ee4Hg-qPbyRBmapJevdcVdwy5Rwo
To claim this, I am signing this object:
extern crate rayon;
extern crate regex;
extern crate scan_dir;
use rayon::prelude::*;
use regex::Regex;
use scan_dir::ScanDir;
use std::env;
use std::fs::File;
@hauleth
hauleth / -
Created September 14, 2015 14:47
fn witness(num: BigInt, a: BigInt, d: &BigInt, s: usize) -> Result {
let mut x = (&a).pow_mod(d, &num);
if x == one() || x == (&num - BigInt::one()) { return Result::Composite }
for _ in 0..s {
x = (&x * &x) % #
if x == one() { return Result::Composite }
if x == (&num - BigInt::one()) { return Result::PropablyPrime }
}
# Example answer file for setup-alpine script
# If you don't want to use a certain option, then comment it out
# Use US layout with US variant
KEYMAPOPTS="us us"
# Set hostname to alpine-test
HOSTNAMEOPTS="-n alpine"
# Contents of /etc/network/interfaces
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file, for x86/x86_64 and ARM platforms.
#
# REVISION : 8.0.5 (18/08/2013)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: http://reverse.put.as - reverser@put.as
Fresh gcc v0.3.8
Fresh pkg-config v0.3.5
Fresh bitflags v0.3.0
Fresh libc v0.1.8
Fresh openssl-sys v0.6.3
Fresh libz-sys v0.1.6
Fresh curl-sys v0.1.24
Fresh libucl-sys v0.1.5
Fresh ucl v0.1.3 (file:///home/hauleth/Workspace/ucl-rs)
Running `/home/hauleth/Workspace/ucl-rs/target/debug/ucl-49bf07184c877340`
Compiling libucl-sys v0.1.4
Running `rustc /home/hauleth/.multirust/toolchains/beta/cargo/registry/src/github.com-1ecc6299db9ec823/libucl-sys-0.1.4/build.rs --crate-name build_script_build --crate-type bin -C prefer-dynamic -g --out-dir /home/hauleth/Workspace/ucl-rs/target/debug/build/libucl-sys-99c2c324b1dfccd4 --emit=dep-info,link -L dependency=/home/hauleth/Workspace/ucl-rs/target/debug/deps -L dependency=/home/hauleth/Workspace/ucl-rs/target/debug/deps -Awarnings`
Compiling libc v0.1.8
Running `rustc /home/hauleth/.multirust/toolchains/beta/cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.1.8/rust/src/liblibc/lib.rs --crate-name libc --crate-type lib -g --cfg feature="cargo-build" --cfg feature="default" -C metadata=2eda841eb12a3090 -C extra-filename=-2eda841eb12a3090 --out-dir /home/hauleth/Workspace/ucl-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/hauleth/Workspace/ucl-rs/target/debug/deps -L dependency=/home/hauleth/Workspace/ucl-rs/target/debug/deps -Awarnings`