Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
👋

Herbert Shin initbar

:octocat:
👋
View GitHub Profile
View generate-github-repo-logo.sh
#!/bin/bash
convert \
-font "Cascadia-Mono-Regular" \
-background "#fff" \
-fill "#000" \
-pointsize 40 \
-size 1024x768 \
-gravity center label:'<title>' \
logo.png
View generate-github-repo-logo.sh
#!/bin/bash
convert \
-font "Cascadia-Mono-Regular" \
-background "#fff" \
-fill "#000" \
-pointsize 42 \
-size 800x200 \
-gravity center label:'<title>' \
logo.png
View blocklist.sh
#!/bin/bash
USER_AGENT='Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0'
{
curl -A "$USER_AGENT" \
-s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*\)'.*/\1/p" \
| sed "s/\&amp;/\&/g" \
| sed "s/http/\"http/g" \
View sync-git.sh
#!/bin/bash
{
for i in $(ls | shuf); do
[ -d "$i" ] && {
[ -d "$i/.git" ] && (
cd "$i"
branch="$(git rev-parse --abbrev-ref HEAD)"
if [[ "${branch}" == 'main' || "${branch}" == 'master' ]]; then
:
View a.sh
cat /var/log/dnscrypt-proxy/query.log | awk '{print $4}' | sort | uniq -c | sort | egrep '\.[^.]*\.[a-z]*$' --color=auto
@initbar
initbar / ffmpeg_metadata.sh
Created May 2, 2021
ffmpeg delete metadata & edit metadata
View ffmpeg_metadata.sh
ffmpeg \
-map_metadata -1 \
-metadata title=<STR> \
-acodec copy \
-vcodec copy \
-map 0:0 \
-map 0:1 \
-i <FILE> \
<STR>
View win-on-chromeos.sh
sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon virt-manager -y
View golden_ratio.py
import turtle
def fib():
i, j = 0, 1
yield i
while True:
i, j = j, i + j
yield i
View Dockerfile
FROM ubuntu:18.04
USER root
WORKDIR /root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
gcc \
View GD transfer to GCS
from google.colab import drive
drive.mount('/content/drive')
from google.colab import auth
auth.authenticate_user()
project_id = 'initbar'
!gcloud config set project {project_id}
!gsutil ls
bucket_name = 'work.init.bar'