Skip to content

Instantly share code, notes, and snippets.

View sugarshin's full-sized avatar
🏕️
I may be slow to respond.

Shingo Sato sugarshin

🏕️
I may be slow to respond.
View GitHub Profile
package main;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
public class Main {
public static void main(String[] args) {
Charset c = StandardCharsets.UTF_8;
String str = "ブラウン ✊ 𠮷野家";
byte[]b = Base64.getEncoder().encode(str.getBytes(c));
function quicksort(arr: number[]): number[] {
const pivot = arr[Math.floor((arr.length - 1) / 2)];
const progress = arr.reduce<[number[], number[]]>(
(ret, n) => {
const first = ret[0];
const second = ret[1];
if (n < pivot) {
if (first[0] && first[0] > n) {
first.unshift(n);
} else {
function quicksort(arr) {
const pivot = arr[Math.floor((arr.length - 1) / 2)];
const progress = arr.reduce(
(ret, n) => {
const first = Array.isArray(ret[0]) ? ret[0] : [];
const second = Array.isArray(ret[1]) ? ret[1] : [];
if (n < pivot) {
if (first[0] && first[0] > n) {
first.unshift(n);
} else {
async function quicksort(arr) {
const pivot = arr[Math.floor((arr.length - 1) / 2)];
const progress = arr.reduce(
(ret, n) => {
const first = Array.isArray(ret[0]) ? ret[0] : [];
const second = Array.isArray(ret[1]) ? ret[1] : [];
if (n < pivot) {
if (first[0] && first[0] > n) {
first.unshift(n);
} else {
el.scrollIntoView({ block: 'center', behavior: 'smooth' });
if [ -d ~/dotfiles ]; then
cd ~/dotfiles
git pull origin master
cd -
else
git clone git@github.com:sugarshin/dotfiles.git ~/dotfiles
fi
/bin/sh ~/dotfiles/setup.sh
@sugarshin
sugarshin / keybase.md
Last active September 19, 2021 23:14 — forked from webframp/keybase.md
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export --query <hash> | gpg --import

Next get the private key

REPOS=(\
$REPO0 \
$REPO1 \
)
for repo in "${REPOS[@]}"; do ag -s -G 'package.json' '(babelcli|d3.js|ffmepg|jquery.js|mysql.js|openssl.js)' $repo ; done
git checkout --orphan prebuilt
cd sub-dir
npm run build
cd -
mv -f sub-dir/package.json ./package.json
mv sub-dir/lib ./lib
git reset #
vim .gitignore # Delete /lib/
git add package.json lib
git commit -m 'Prebuilt'