Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathaniel nathanielks

View GitHub Profile
@frank-dspeed
frank-dspeed / get-es-path.mjs
Created Jan 23, 2020
Method to get Current File Path inside ESM
View get-es-path.mjs
//import.meta.url
function getPath(url) {
let result = new URL(import.meta.url)
let pathname = result.pathname
let pathArray = pathname.split('/')
let basename = pathArray.pop()
let dirname = pathArray.join('/')
return { pathname, dirname,basename}
}
@webframp
webframp / keybase.md
Created Jul 25, 2017
Signing git commits on github using keybase.io gpg key
View keybase.md

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@euank
euank / Dockerfile
Last active Aug 30, 2017
ECS / EC2 Metadata entrypoint example
View Dockerfile
FROM golang:1.4
COPY entrypoint.sh /entrypoint.sh
COPY main.go main.go
RUN go build -o main main.go
RUN chmod +x /entrypoint.sh
EXPOSE 8080
ENTRYPOINT ["/entrypoint.sh"]
CMD ["./main"]
@acdvorak
acdvorak / tmux-all-panes.sh
Last active Aug 6, 2021 — forked from yubink/inall.sh
tmux: run a command in all panes
View tmux-all-panes.sh
#!/bin/bash
# Runs the specified command (provided by the first argument) in all tmux panes
# in every window. If an application is currently running in a given pane
# (e.g., vim), it is suspended and then resumed so the command can be run.
all-panes()
{
all-panes-bg_ "$1" &
}
@Rarst
Rarst / r-debug.php
Last active Nov 7, 2022
R Debug (set of dump helpers for debug)
View r-debug.php
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/