Skip to content

Instantly share code, notes, and snippets.

View morisono's full-sized avatar

morisono

View GitHub Profile
@mrkpatchaa
mrkpatchaa / README.md
Last active April 15, 2025 00:19
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.

@olih
olih / jq-cheetsheet.md
Last active April 18, 2025 13:17
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

#!/bin/sh
# -*- tab-width: 30 -*-
# list shamelessly stolen from http://unicodeemoticons.com/
selecta <<'EOF' | cut -f 1 | tr -d '\n' | tr '\a' '\n' | pbcopy
☺ smiley face
☻ smiley face
✌ V sign
☹ unhappy
♡ heart
@jamesramsay
jamesramsay / README.md
Last active March 29, 2025 18:58
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
@rick0000
rick0000 / HoraResultCalclatorTestData.txt
Last active March 13, 2023 12:04
麻雀AI役判定プログラム用テストデータ
This file has been truncated, but you can view the full file.
{"type":"hora","kyoku":1,"bakaze":"E","actor":0,"target":0,"pai":"2p","dora_markers":["4m"],"uradora_markers":["4s"],"hora_tehais":["7m","8m","9m","3p","4p","5p","6p","7p","2s","2s","7s","8s","9s"],"hora_furos":[],"yakus":[["reach",1.0],["menzenchin_tsumoho",1.0],["pinfu",1.0]],"fu":20,"fan":3,"hora_points":3900,"deltas":[4900,-1300,-1300,-1300],"scores":[28900,23700,23700,23700]}
{"type":"hora","kyoku":1,"bakaze":"E","actor":2,"target":2,"pai":"4s","dora_markers":["E"],"uradora_markers":[],"hora_tehais":["3m","4m","5m","4s","5sr","5s","5s"],"hora_furos":[["minsyun","6p","7p","8p"],["minko","W","W","W"]],"yakus":[["jikaze",1.0],["akadora",1.0]],"fu":40,"fan":2,"hora_points":2700,"deltas":[-1400,-800,3000,-800],"scores":[27500,22900,26700,22900]}
{"type":"hora","kyoku":2,"bakaze":"E","actor":1,"target":0,"pai":"7s","dora_markers":["8p"],"uradora_markers":["9m"],"hora_tehais":["1m","1m","4m","5m","6m","3p","4p","5p","8s","9s","9s","9s","9s"],"hora_furos":[],"yakus":[["reach",1.0],["uradora",2.0]],"fu":40,"fan":
@kurozumi
kurozumi / amazon-reservation.py
Created November 9, 2015 07:01
【Python】アマゾン・ホビーカテゴリの予約商品のasinと発売日を取得
# coding: utf-8
from selenium import webdriver
import re
asins=[]
driver = webdriver.PhantomJS()
for page in range(1,3):
@fatum12
fatum12 / ttc2ttf.pe
Last active April 13, 2025 23:54
Unpack .ttc and .dfont to .ttf using FontForge
#!/usr/local/bin/fontforge
# Usage: fontforge -script ttc2ttf.pe /path/to/font.ttc
fonts = FontsInFile($1)
n = SizeOf(fonts)
i = 0
while (i < n)
Open($1 + "(" + fonts[i] + ")", 1)
index = ToString(i + 1)
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active April 9, 2025 09:08
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@ProjectCleverWeb
ProjectCleverWeb / centered.md
Last active September 20, 2023 09:46
Example of how to do centered text and images in Githb Flavored Markdown
@cferdinandi
cferdinandi / terminal-cheat-sheet.txt
Last active April 8, 2025 13:14
Terminal Cheat Sheet
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help