Skip to content

Instantly share code, notes, and snippets.

View Superbil's full-sized avatar
:shipit:
Working in Cloud

Superbil Superbil

:shipit:
Working in Cloud
View GitHub Profile
@Superbil
Superbil / _uninstall.sh
Last active April 11, 2024 03:40
HiPKILocalSignServer macOS 1.3.4.7
#!/usr/bin/env bash
## Use sudo to run this script
rm -rf ~/Library/HiPKILocalSignServer/
rm -rf ~/Lib/libHicos_p11v1.dylib
rm -rf ~/bin/checkHIPKILocalServer.sh
rm -rf ~/bin/stopHIPKILocalServer.sh
@Superbil
Superbil / chromium_update.sh
Created September 16, 2010 16:22
auto update chromium on osx
#!/bin/bash
# Chromium update script
# - by shad <shad@zaphod.eu>
# - by superbil <help@superbil.info>
OS=mac
SITE=http://build.chromium.org/buildbot/snapshots/chromium-rel-
LATEST=$(wget -q -O - ${SITE}${OS}/LATEST)
INSTALL_DIR=/Applications
TARGET=Chromium
@Superbil
Superbil / ascii_SisterPillar.c
Last active September 14, 2023 15:48 — forked from CindyLinz/SisterPillar.c
乖乖寫個柱姐..
/*XXXXXXXXXNXNNXXXXXNNNNNNNNNXKxoloodddddx0XXk0XXXXXXXNNNNNNNNNNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXXXXXXNNNNNNXKkdlccllccllccloodOdddxk0KKXXXNNNNNNNNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXXXXXXXXXKxc,.''',,;;;,,'....,,'''.,',cdxO0KXNNNNNNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXXXXXXXx:........''''..''...........''',:coxOKXNNNNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXXXX0l...................................'',;:lkXXNNNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXX0,................''.....................'',,,;o0XNNNNNNNNNNNNNNN
XXXXXXXXXXXXXXK;.........................................'.'''''lKNNNNNNNNNNNNNN
XXXXXXXXXXXXX0c..................'................. .. ...'......,kXNNNNNNNNNNNN
XXXXXXXXXXXK:. .............'...........''......'..... ....'......'dXNNNNNNNNNNN
XXXXXXXXXXO. .... ...........................'''.......''.',.......xNNNNNNNNNNN
@Superbil
Superbil / ascii_buddha_bless
Last active September 14, 2023 15:46 — forked from racklin/index.js
Buddha bless, never BUG
_oo0oo_
o8888888o
88" . "88
(| -_- |)
0\ = /0
___/`---'\___
.' \\| |# '.
/ \\||| : |||# \
/ _||||| -:- |||||- \
@Superbil
Superbil / talk-org-mode.org
Last active February 12, 2023 07:37
[PyHUG] July: Use Python in Org-mode

[PyHUG] July: Use Python in Org-mode

About

@Superbil
Superbil / verbos-argpary-example.py
Created December 27, 2022 15:11 — forked from ms5/verbos-argpary-example.py
manipulating log level with python argparse
import argparse
import logging
parser = argparse.ArgumentParser()
parser.add_argument('--verbose', '-v', action='count', default=1)
args = parser.parse_args()
args.verbose = 40 - (10 * args.verbose) if args.verbose > 0 else 0
logging.basicConfig(level=args.verbose, format='%(asctime)s %(levelname)s: %(message)s',
@Superbil
Superbil / reflect.py
Created December 27, 2022 09:30 — forked from 1kastner/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@Superbil
Superbil / .zshrc
Created November 30, 2022 16:11 — forked from bmhatfield/.zshrc
OSX Keychain Environment Variables
# If you use bash, this technique isn't really zsh specific. Adapt as needed.
source ~/keychain-environment-variables.sh
# AWS configuration example, after doing:
# $ set-keychain-environment-variable AWS_ACCESS_KEY_ID
# provide: "AKIAYOURACCESSKEY"
# $ set-keychain-environment-variable AWS_SECRET_ACCESS_KEY
# provide: "j1/yoursupersecret/password"
export AWS_ACCESS_KEY_ID=$(keychain-environment-variable AWS_ACCESS_KEY_ID);
export AWS_SECRET_ACCESS_KEY=$(keychain-environment-variable AWS_SECRET_ACCESS_KEY);
@Superbil
Superbil / update_exts.sh
Last active October 6, 2022 18:25
Update default videos to open by player
#!/usr/bin/env zsh
## Update exts
# Author: Superbil
# website: https://gist.github.com/Superbil/860b906fa3370a55201a73d2b6396dd9
# Use duti to setup player
#
# Usage update_exts.sh <bundle_id>
#
# Check argv
@Superbil
Superbil / git_time_between_commits.sh
Last active September 12, 2022 08:21
Calculate time between git commits
# Calculate time between git commits
# Update rev-list target to your range or branch
# ref https://stackoverflow.com/questions/22725469/calculate-time-between-git-commits
for ix in `git rev-list @`; do
# get committer date, UNIX timestamp (%ct)
thists=`git log $ix -n 1 --format=%ct`;
prevts=`git log $ix~1 -n 1 --format=%ct 2>/dev/null`;
if [ ! -z "$prevts" ] ; then
delta=$(( $thists - $prevts ));
# get substring of hash (#ix)