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/sh | |
RELEASE=$(/usr/local/bin/go list -m -f '{{.Version}}' go@latest) | |
GO_FILE=go${RELEASE}.linux-amd64.tar.gz | |
BIN=https://go.dev/dl/${GO_FILE} | |
echo "download $GO_FILE from $BIN ..." |
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
_somafm() { | |
mpv $1 2> /dev/null | awk '/title/ { s = ""; for (i = 2; i <= NF; i++) s = s $i " "; cmd="(date +'%H:%M:%S')"; cmd | getline d; print d,"|",s; close(cmd) }' | |
} | |
alias groovesalad='_somafm "http://ice1.somafm.com/groovesalad-128-aac"' | |
alias defcon='_somafm "http://ice1.somafm.com/defcon-128-aac"' | |
alias deepspaceone='_somafm "http://ice1.somafm.com/deepspaceone-128-aac"' |
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
┌──────────────────┐ | |
│ Unknown command! │ | |
└────. .───────────┘ | |
V | |
╭─╮ | |
⌾ ⌾ | |
│▕│ | |
╰─╯ |
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 main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"net/textproto" | |
"os" | |
"os/signal" | |
"strings" |
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 main | |
import ( | |
"fmt" | |
"net/url" | |
"os" | |
"strconv" | |
"github.com/ChimeraCoder/anaconda" | |
) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div style="margin: auto;width: 800px;"> | |
<div id="player"></div> | |
</div> |
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
#!/usr/bin/env python | |
import requests | |
from tabulate import tabulate | |
data = requests.get(url="http://worldcup.sfg.io/matches/today").json() | |
def status_color(status): | |
cstatus = { | |
'completed': '\033[92m', | |
'in progress': '\033[93m', |
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/sh | |
DEFCON="http://ice1.somafm.com/defcon-128-aac" | |
GROOVE="http://ice1.somafm.com/groovesalad-128-aac" | |
DEEP_SPACE_ONE="http://ice1.somafm.com/deepspaceone-128-aac" | |
COVERS="http://ice1.somafm.com/covers-128-aac" | |
case $1 in | |
"defcon") URL=$DEFCON ;; | |
"groove") URL=$GROOVE ;; |
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
[window_name] | |
command=xprop -id $(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}') | awk '/_NET_WM_NAME/{$1=$2="";print}' | cut -d'"' -f2 | |
interval=1 | |
color=#ffffff |
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 | |
# ssh user config (http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config) | |
SSH_CONFIG=~/.ssh/config | |
# local port | |
PORT=8888 | |
# array with hosts from SSH_CONFIG. | |
# append "#socks5" at the end of the Host line. |