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 / wordle.md
Created February 4, 2022 16:18 — forked from huytd/wordle.md
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@Superbil
Superbil / Kernel_Debug_Kit_11.0_build_20A5374i_README
Last active July 8, 2022 10:48
Kernel Debug Kit 11.0 build 20A5374i
Kernel Debug Kit for macOS - Read Me
Use the Kernel Debug Kit (KDK) to debug kernel-level code, such as kernel extensions you create.
Performing Two-Machine Debugging
The KDK supports the debugging of kernel-level code, such as kernel extensions, from a second Mac.
- The target device is the Mac that runs the code you want to debug.
- The host device is the Mac that runs the debugger.
Identify the Device Compatibility
@Superbil
Superbil / chroot-to-pi.sh
Last active September 21, 2020 16:35 — forked from htruong/chroot-to-pi.sh
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
> LANG=en_US.UTF-8 git
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
// imgLib -> Image package from https://pub.dartlang.org/packages/image
import 'package:image/image.dart' as imglib;
import 'package:camera/camera.dart';
Future<List<int>> convertImagetoPng(CameraImage image) async {
try {
imglib.Image img;
if (image.format.group == ImageFormatGroup.yuv420) {
img = _convertYUV420(image);
} else if (image.format.group == ImageFormatGroup.bgra8888) {
#! /usr/bin/env osascript
tell application "System Events"
if name of every process contains "FollowUpUI" then
tell window 1 of process "FollowUpUI"
click button "允許"
delay 2
set code to value of static text 1 of group 1
log (code)
click button "完成"
end tell
@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 / pacman.sh
Last active December 26, 2019 15:49
Get last update time of pacman
last_upgrade_pacman_time () {
\grep -e "\[PACMAN\] starting full system upgrade" /var/log/pacman.log | tail -1 | awk -F "]" '{print substr($1,2)}'
}
@Superbil
Superbil / git-redate
Created April 26, 2019 19:56
git reset range commits to date
#!/bin/bash
while [[ $# -gt 1 ]]
do
key="$1"
case $key in
-c| --commits)
COMMITS="$2"
shift
@Superbil
Superbil / ClassName.swift
Last active March 8, 2019 09:25
Easy to create ViewController
import Foundation
protocol ClassNameProtocol {
static var className: String { get }
var className: String { get }
}
extension ClassNameProtocol {
static var className: String {
return String(describing: self)