Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Nilsson danijeel

View GitHub Profile
View after_clean_cache.log
> make docker-all
docker build -f docker/Dockerfile-build . -t appgate-operator-builder
Sending build context to Docker daemon 2.014MB
Step 1/5 : FROM python:rc-slim
---> 85fb5601ad8f
Step 2/5 : RUN apt-get update && apt-get install make gcc libffi-dev --yes
---> Running in 87d05fd8e2c9
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
@danijeel
danijeel / index.sh
Last active Aug 9, 2018
#bash #boilerplate
View index.sh
#!/bin/bash
# https://explainshell.com/explain?cmd=set+-euxo%20pipefail
set -eou pipefail
yell() { echo "$0: $*" >&2; }
die() { yell "$*"; exit 111; }
try() { echo "$ $@" 1>&2; "$@" || die "cannot $*"; }
# log to syslog and echo output
info() {
@danijeel
danijeel / aws_retry.sh
Last active Mar 23, 2018
#bash #aws #retry awscli retry backoff for bash
View aws_retry.sh
#!/usr/bin/env bash
set -e
aws_retry() {
last_aws_call=""
local max_attempts=${ATTEMPTS-8}
local timeout=${TIMEOUT-2}
local attempt=0
local exitCode=0
@danijeel
danijeel / shutdown.js
Last active Feb 2, 2018
#windows Windows 10 shutdown prompt (Alt+F4)
View shutdown.js
(new ActiveXObject("Shell.Application")).ShutdownWindows();
View keybase.md

Keybase proof

I hereby claim:

  • I am danijeel on github.
  • I am danijeel (https://keybase.io/danijeel) on keybase.
  • I have a public key whose fingerprint is F928 2329 DBF9 5448 27B9 9D6F F23E 000A 2F0D 0C55

To claim this, I am signing this object:

@danijeel
danijeel / cdRomEject_every_10_second.vbs
Created Dec 16, 2013
Annoying Windows script to eject cdrom every 10 second
View cdRomEject_every_10_second.vbs
set oWMP = CreateObject("WMPlayer.OCX.7")
set colCDROMs = oWMP.cdromCollection
wscript.sleep 10
do
if colCDROMs.Count >= 1 then
for i = 0 to colCDROMs.Count -1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count -1
colCDROMs.Item(i).Eject
You can’t perform that action at this time.