I hereby claim:
- I am eze-kiel on github.
- I am ezekiell (https://keybase.io/ezekiell) on keybase.
- I have a public key ASAJlh8hSpAfr6NMmZOKDbKnX3IU7KgRQEGIk1x2Q1-R0go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"net" | |
"github.com/google/gopacket" | |
"github.com/google/gopacket/layers" | |
"github.com/google/gopacket/pcap" | |
) |
#!/bin/bash | |
YELLOW='\033[1;33m' | |
NOCOLOR='\033[0m' | |
# Backblaze B2 configuration variables | |
B2_ACCOUNT="ACCOUNT" | |
B2_KEY="KEY" | |
B2_BUCKET="BUCKET-NAME" |
GOCMD=go | |
GOTEST=$(GOCMD) test | |
GOVET=$(GOCMD) vet | |
BINARY_NAME=program-name | |
VERSION?=0.0.0 | |
DOCKER_REGISTRY?= | |
GREEN := $(shell tput -Txterm setaf 2) | |
YELLOW := $(shell tput -Txterm setaf 3) | |
WHITE := $(shell tput -Txterm setaf 7) |
#!/bin/bash | |
STATE=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | head -n 12 | tail -n1 | awk '{print $2}') | |
if [ "$STATE" == "charging" ]; then | |
exit 0 | |
fi | |
PERCENT=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | head -n 21 | tail -n1 | awk '{print $2}' | cut -d '%' -f1) | |
if [ $PERCENT -lt 20 ]; then | |
export DISPLAY=:0 |
# i3 config relevant part | |
bindsym XF86AudioMute exec --no-startup-id "amixer -q set Master toggle; /path/to/notify-volume-mute.sh" | |
bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer -q set Master 3%+ unmute; /path/to/notify-volume-set.sh" | |
bindsym XF86AudioLowerVolume exec --no-startup-id "amixer -q set Master 3%- unmute; /path/to/notify-volume-set.sh" |
GOCMD=go | |
GOTEST=$(GOCMD) test | |
GOVET=$(GOCMD) vet | |
BINARY_NAME= | |
VERSION=$(shell git describe --tags) | |
DOCKER_REGISTRY?= | |
BUILD_DATE=$(shell date +'%Y-%m-%d_%H:%M:%ST%Z') | |
GREEN := $(shell tput -Txterm setaf 2) | |
YELLOW := $(shell tput -Txterm setaf 3) |
#!/bin/bash | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) unrar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xf $1 ;; |
/* | |
Context: https://en.wikipedia.org/wiki/Tower_of_Hanoi | |
Test this code: https://playground.hugoblanc.com/snippet/wryG6Tqv6aZ | |
*/ | |
package main | |
import "fmt" | |
var a, b, c []int |
# prompt customization for .bashrc | |
# `root` has a red prompt, others a yellow/brown one. | |
# If we are connected remotely, `@<hostname>` shows first. | |
build_ps1() { | |
local prompt_color='\[\e[33m\]' | |
local host='' | |
[[ $UID -eq 0 ]] && prompt_color='\[\e[1;31m\]' | |
[[ $SSH_TTY ]] && host="@$HOSTNAME " | |
echo "${prompt_color}${host}\w\[\e[0m\]" | |
} |