Skip to content

Instantly share code, notes, and snippets.

Felix C. Stegerman obfusk

Block or report user

Report or block obfusk

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
@obfusk
obfusk / dl-links.js
Created Jun 24, 2019
get all download links for `wget -i`
View dl-links.js
@obfusk
obfusk / dl.sh
Created Jun 24, 2019
download multiple torrents w/ aria2c
View dl.sh
aria2c --seed-time=0 -j99 -Z -V *.torrent
@obfusk
obfusk / aaa-README
Last active Nov 13, 2018
nix quoting weirdness
View aaa-README
so the problem was: the unquoted string was being pathname expanded and nullglob was set by $stdenv/setup
View caveats.nix
with builtins;
compareVersions "3.7.1-rc2" "3.7.1"
# => 1
baseNameOf "foo//"
# => ""
@obfusk
obfusk / default.nix
Last active Nov 2, 2018
attempt to build vault w/ ui on nix | --> https://github.com/obfusk/nix-vault-with-ui
View default.nix
{ pkgs ? import <nixpkgs> {} }:
let
bp = pkgs.callPackage (fetchGit {
url = "https://github.com/serokell/nix-npm-buildpackage.git";
rev = "1f607e575b6b313dc6ac7bc83313ef718d1e2184";
ref = "1f607e5-tag-you-are-it"; # TODO: "v0.1.0"
}) {};
integreties = {
@obfusk
obfusk / default.nix
Created Oct 13, 2018
build vault ui w/ nix-npm-buildpackage
View default.nix
{ pkgs ? import <nixpkgs> {} }:
let
buildNpmPackage = pkgs.callPackage ~/dev/nix-npm-buildpackage {};
integreties = {
"https://codeload.github.com/icholy/Duration.js/tar.gz/cb1c58efc2772ef0f261da9e2535890734a86417" = "cb52be3c1b0d5073d2d06f4bf0b9d7f5c53ee925";
"https://codeload.github.com/meirish/broccoli-sri-hash/tar.gz/5ebad6f345c38d45461676c7a298a0b61be4a39d" = "2a5818cb88b7b6ed5bfdddcba6a3747fe6f096c6";
"https://codeload.github.com/meirish/ember-cli-sri/tar.gz/1c0ff776a61f09121d1ea69ce16e4653da5e1efa" = "0f6ee264b58a3f8d6c415099f8d3193cde73d692";
};
in buildNpmPackage {
src = ./.;
@obfusk
obfusk / key-to-fingerprint.sh
Created Sep 28, 2018
get fingerprint of public ssh key
View key-to-fingerprint.sh
ssh-keygen -lf - <<< "ssh-..."
@obfusk
obfusk / get.exs
Last active Aug 30, 2018
tiny elixir HTTP GET client w/ ssl verification using python3-certifi's certificate bundle
View get.exs
#!/usr/bin/elixir
defmodule HTTPGetter do
@cert '/usr/lib/python3/dist-packages/certifi/cacert.pem'
@opts [ ssl: [ verify: :verify_peer, cacertfile: @cert ] ]
def die msg do
IO.puts :stderr, msg; exit { :shutdown, 1 }
end
def get url do
case :httpc.request :get, { String.to_charlist(url), [] }, @opts, [] do
{ :ok, { { _v, 200, _m }, _h, body } } -> :erlang.list_to_binary body
@obfusk
obfusk / gh-merged-prs.sh
Created Dec 20, 2017
github merged pull requests etc. via api w/ curl and jq
View gh-merged-prs.sh
author=obfusk
curl -s -- "https://api.github.com/search/issues?q=type:pr+is:merged+author:$author&per_page=100" \
| jq '.items[].repository_url'
@obfusk
obfusk / client-ssh.sh
Last active Jun 23, 2018
m-over-reverse-ssh
View client-ssh.sh
#!/bin/bash
cleanup() {
trap - EXIT INT TERM HUP
rm -f ~/._m_fifo_{i,o}
}
echo CLIENT SSH >&2
mkfifo ~/._m_fifo_{i,o}
trap cleanup EXIT; trap exit INT TERM HUP
{ while cat ~/._m_fifo_o; do :; done; } & cat > ~/._m_fifo_i; wait
You can’t perform that action at this time.