Skip to content

Instantly share code, notes, and snippets.

View knl's full-sized avatar

Nikola Knežević knl

View GitHub Profile
@knl
knl / disable-gh-actions.sh
Created February 14, 2021 23:21
Disable actions on all owned repos
#!/usr/bin/env nix-shell
#!nix-shell -p gitAndTools.hub
#!nix-shell -p jq
#!nix-shell -p bash
#!nix-shell -i bash
# Author: Nikola Knezevic
# Description: Will disable all actions on all repositories where the given
# token is the owner.
@knl
knl / index.adoc
Created August 29, 2019 08:02
Asciidoctor: interference between attribute substitutions and source highlighting

Lorem

ipsum

@knl
knl / gist:fe92e317f0e707e77e7902a7667538a4
Created August 8, 2019 12:03
terraform-import-chomp-newlines
TF_LOG=debug terraform import secret_resource.newlines "$(cat file_ending_with_newline)"
2019/08/08 14:02:04 [INFO] Terraform version: 0.12.6
2019/08/08 14:02:04 [INFO] Go runtime version: go1.12.7
2019/08/08 14:02:04 [INFO] CLI args: []string{"/usr/local/bin/terraform", "import", "secret_resource.newlines", "some\ntext"}
2019/08/08 14:02:04 [DEBUG] Attempting to open CLI config file: /Users/knl/.terraformrc
2019/08/08 14:02:04 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/08/08 14:02:04 [INFO] CLI command args: []string{"import", "secret_resource.newlines", "some\ntext"}
2019/08/08 14:02:04 [DEBUG] New state was assigned lineage "e3e0d021-6915-c30b-bca1-5fb5122e7814"
2019/08/08 14:02:04 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2019/08/08 14:02:04 [TRACE] Meta.Backend: instantiated backend of type <nil>
@knl
knl / github-jira-love.js
Last active March 30, 2021 03:27
Greasemonkey user script to link back to JIRA from GitHub
// ==UserScript==
// @name GitHub/JIRA Links
// @namespace http://github.com/knl
// @author knl
// @version 1.2.2
// @description Link to JIRA tickets from Github
// @match https://github.com/**
// @run-at document-end
// @noframes
// @grant none
@knl
knl / jailnet.pl
Last active August 29, 2015 14:12
Script for producing a pf.conf for jail traffic NAT/redirection
#!/usr/bin/env perl
# blog: http://localhost:8000/blog/2014/blog/2014-12-31-using-warden-to-setup-jails-in-freebsd.html
use strict;
use warnings;
use v5.10; # because we use some new stuff
use feature qw(say);
my $card = 're0';
@knl
knl / keybase.md
Created September 27, 2014 10:26
keybase.md

Keybase proof

I hereby claim:

  • I am knl on github.
  • I am knl (https://keybase.io/knl) on keybase.
  • I have a public key whose fingerprint is C42D E227 704C 2105 6A9B CB2F 37B2 6EEC 033A D741

To claim this, I am signing this object: