This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference: https://www.nginx.com/resources/wiki/community/faq/#how-do-i-generate-an-htpasswd-file-without-having-apache-tools-installed | |
USER="alice" | |
PW="the_password" | |
printf "$USER:$(openssl passwd -apr1 $PW)\n" >> .htpasswd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cleanup-wg.core | |
(:import [io.kubernetes.client.util ClientBuilder] | |
[io.kubernetes.client.util KubeConfig] | |
[io.kubernetes.client Configuration] | |
[io.kubernetes.client.apis CoreV1Api]) | |
(:gen-class)) | |
(defn -main | |
"List all namespaces on given Kubernetes cluster" | |
[& args] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ~/.lein/profiles.clj | |
{:user | |
{:plugins [[jonase/eastwood "0.3.10"] | |
[lein-cljfmt "0.6.7"] | |
[cider/cider-nrepl "0.24.0"]] | |
:dependencies [[cljfmt "0.6.7"]]}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
[Jenkinsfile] | |
indent_size = 4 | |
indent_style = space | |
[*.groovy] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; package --- Testing script from emacs | |
;;; Commentary: | |
;;; Code: | |
;; $ emacs --script test.el | |
(message "Hello World!") | |
(defun mytest2() | |
(message "hi!")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#-- | |
# Simple boilerplate generator for TypeScript projects | |
#-- | |
project_name=$1 | |
main_file=${2:-index.ts} | |
mkdir $project_name && cd $project_name | |
npm init -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; Clojure is a Lisp family functional programming language developed for the JVM | |
;; | |
;; It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures. | |
;; —Alan Perlis | |
;; | |
;; Reference: https://www.braveclojure.com/ | |
;; | |
; The first call in a file should be ns, to set the namespace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-- | |
# The -p option takes each line of the standard input (STDIN) and assigns that line to the variable $_, | |
# then executes the script on that line. The $_ variable is a special variable which is set each | |
# iteration of the loop. When your script is complete it prints out the value of $_ to standard | |
# output (STDOUT). If there are command line arguments, -p will use those arguments as filenames and | |
# perform the same steps on each line of those files. | |
# | |
# The -n option is similar to -p except it does not print every line to the standard output. | |
#-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
image=$1 | |
usage () { | |
echo -n "Usage: $0 <full-image-URL> | |
Count number of layers of given Docker image | |
Options: | |
-h, --help Display this help and exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
#-------------------------------------------------------------- | |
# py-compile.sh | |
# | |
# Generates a binary file for Linux from a Python source | |
# | |
# Usage: py-compile.sh myfile.py | |
#-------------------------------------------------------------- | |
set -e |