Skip to content

Instantly share code, notes, and snippets.

View eggplants's full-sized avatar
🏠
Working from home

haruna eggplants

🏠
Working from home
View GitHub Profile
@eggplants
eggplants / get_haiku.rb
Last active January 7, 2024 20:45
全俳句データベース https://horicun.moo.jp/contents/haiku/ in Ruby
#!/usr/bin/env ruby
def get_haiku n
len = 17
# Ver 1:
# https://horicun.moo.jp/contents/haiku/random.html?number_search=1
hiragana = "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉゃゅょゎっゐゑーゔん"
# Ver 2:
@eggplants
eggplants / arti_on_ubuntu.md
Last active April 28, 2024 15:53
Connect to `.onion` websites via SOCKS Proxy with Arti (version: 1.1.11)

How to connect to .onion websites via SOCKS Proxy with Arti

Environment

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.10
Release: 23.10
@eggplants
eggplants / install-apache-flex.sh
Last active December 1, 2023 17:57
Install Apache Flex 4.16.1 on Ubuntu 23.10
#!/usr/bin/env bash
set -euo pipefail
flex_home="$HOME/.flex"
if [[ -v FLEX_HOME && "$FLEX_HOME" != "$flex_home" ]]; then
echo '"$FLEX_HOME" (global) != "$flex_home": '"\"${FLEX_HOME}\" and \"${flex_home}\"" >& 2
exit 1
fi
@eggplants
eggplants / git-svn-2023.md
Last active November 26, 2023 03:28 — forked from yancyn/git-svn.md
Migrate Archive Google Code SVN to Git

Note

備考

Tip

ちょっとしたヒントとか、知っておくと良いこと

Important

重要事項

[!WARNING]

@eggplants
eggplants / gen.sh
Last active September 8, 2023 19:59
漢字でGO!問題リストを作る
#!/usr/bin/env bash
set -euo pipefail
LOG="${LOG:-}"
[[ -n "$LOG" ]] && echo Verbose LOG will not be printed.
SKIP="${SKIP:-}"
[[ -n "$SKIP" ]] && echo Processes of image conversion will be skipped.
@eggplants
eggplants / refresh_cache_on_camo.sh
Created September 3, 2023 01:39
How to remove all cache of camo image icons in GitHub images
#!/usr/bin/env bash
curl -s https://github.com/... | grep -oE 'https://camo[^"]+' | while read i;do curl -X PURGE "$i";echo;done
#!/usr/bin/env bash
set -euo pipefail
if ! [[ $# == 2 ]]
then
echo "$0 FILE_ID SAVE_PATH" >&2
exit 1
fi
const sweepBomb = (i, j) => document.getElementsByTagName("tr")[i].getElementsByTagName("td")[j].click();
const sweep = () => {
document.getElementById("restartBtn").click();
for(var i = 0; i < 15; i++) {
for(var j = 0; j < 15; j++) {
if(bomb_data[i][j] == 0){
sweepBomb(i,j);
};
};