Skip to content

Instantly share code, notes, and snippets.


Andrej 4ndrej

View GitHub Profile
4ndrej /
Created February 22, 2023 07:47 — forked from dirkjanfaber/
Download the story of us as epub (waitbutwhy)
dir=$(mktemp --directory)
declare -a input=()
cat <<__EOT__ > ${dir}/metadata.txt
title: The Story of Us
author: Tim Urban
rights: Creative Commons Non-Commercial Share Alike 3.0
4ndrej /
Created September 1, 2020 23:28 — forked from colindekker/
CertBot manual auth hook for Azure DNS using Azure CLI
# The hook supports 2 actions, 'create' and 'delete', passed as the first argument.
# When 'create' is passed in, a validation TXT record is added,
# 'delete' cleans up that record after validation
# The second the name of the Azure Account that contains the DNS Zone Resource
# set the name of the Azure Resource Group that contains the DNS Zone Resource
4ndrej /
Created October 14, 2019 20:56 — forked from nogweii/
A quick test to see if you have the JCE Unlimited Strength Jurisdiction Policy files installed. If you don't, in Java 6 you'll see 128. If you do, you'll see 2147483647. Thanks to
import javax.crypto.Cipher;
class Test {
public static void main(String[] args) {
try {
System.out.println("Hello World!");
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
} catch (Exception e){
System.out.println("Sad world :(");

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
View go-lang-factorization-tests-multithreaded.go
package main
import (
func runInThread(wg *sync.WaitGroup, startFrom int64, numOfIterations int64) {
defer wg.Done()
4ndrej /
Created December 22, 2013 02:28 — forked from shirishp/
#! /bin/bash
# Author: Shirish Padalkar (
if [ "$#" -ne 1 ]; then
echo "Usage: $0 infoq_presentation_url"
exit 1
url_with_spaces=`curl -A "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10" $1 | grep "<source src=" | tr -dc "[:print:]"`