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 / 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 July 20, 2024 00:45 — forked from yancyn/git-svn.md
Migrate Archive Google Code SVN to Git

Note

備考

Tip

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

Important

重要事項

[!WARNING]

@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);
};
};
@eggplants
eggplants / dorako_on_wine_and_ubuntu.md
Last active April 21, 2025 19:29
RPGツクール2000ゲーム「ドラ子の出稼ぎ物語」をWine 10.6とUbuntu 25.04で動かすまで

RPGツクール2000ゲーム「ドラ子の出稼ぎ物語」をWineとUbuntuで動かすまで

検証環境

  • Ubuntu 25.04
  • wine-10.6 (WoW64)
lsb_release -a
No LSB modules are available.
@eggplants
eggplants / ans.csv
Last active December 2, 2023 14:14
Shellgei Online Judge 回答 1~38 - https://shellgei-online-judge.com/
problemNum shellgei
00000001 echo test
00000002 echo $(<input.txt)
00000003 seq 10
00000004 awk '{a=0;for(i=1;i<=NF;){a+=$(i++)}print a}' input.txt
00000005 j=1;for i in {0..10};do echo ${f:-0};((k=f+j,f=j,j=k));done
00000006 bc -l<<<'4*a(1)'|cut -b-12
00000007 bc -l<<<'scale=999;4*a(1)'|tr -d '\\\\\n'|cut -b-102
00000008 awk '{print x=$1-(y=$2/2-$1),y}' input.txt
00000009 sed -zr 's/([^\n])\n([^\n])/\1@\2/g' input.txt|sort -rV|while read i;do [ -n "$i" ]&&echo $i$'\n'|tr @ \\n;done|sed \$d
@eggplants
eggplants / ruby.sh
Last active April 14, 2023 04:32
ルビ
#!/usr/bin/env bash
if ! command -v mecab nkf &>/dev/null
then
echo "install: mecab nkf" >&1
exit 1
fi
read -r input