Skip to content

Instantly share code, notes, and snippets.

@aachyee
aachyee / private_fork.md
Created April 29, 2025 13:02 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@aachyee
aachyee / GitCommandLogs.sh
Created March 30, 2025 05:30 — forked from akirakw/GitCommandLogs.sh
作業で使ったGitのコマンドを淡々と書きとめるよ
# まずClone
git clone [email protected]:ashigeru/asakusafw.git
cd asakusafw
# リモートブランチのチェックアウト
git branch -a
git checkout -b dmdl origin/dmdl
# ほかのリポジトリのフェッチ
git remote add akirakw https://github.com/akirakw/asakusafw.git
@aachyee
aachyee / termux-pacman-glibc-setup.sh
Created March 19, 2025 09:08 — forked from CodeIter/termux-pacman-glibc-setup.sh
Setup `glibc-runner` with pacman on Termux and install Deno.JS and Bun.JS .
#!/usr/bin/env -S bash -xeuo pipefail
set -xeuo pipefail
pkg install pacman patchelf \
which time ldd tree
echo
echo
@aachyee
aachyee / abemadl.sh
Created March 7, 2025 12:09 — forked from Winding6636/abemadl.sh
abema_tv streamlink script
#!/bin/bash
# Abema TV Download Script
#
# require streamlink
# 作品ページ: https://abema.tv/video/title/{作品ID}
# 各話ページ: https://abema.tv/video/episode/{作品ID}_s1_p{話数ID}
# チャンネル見逃し配信: https://abema.tv/channels/abema-anime-2(チャンネルID)/slots/{動画ID}
# 無料もののみ またその判定はしていない。トークンを有料垢にすれば多分動く
# ./abemadl.sh URL {-f|-t title}
#
@aachyee
aachyee / add_sys-gcc-link_to_brew-bin.sh
Last active March 1, 2025 18:31
Make system gcc/g++ the default c/c++ compiler for brew.
@aachyee
aachyee / gcc-default-fix.sh
Created February 26, 2025 05:03 — forked from alghanmi/gcc-default-fix.sh
Change the default g++ compiler on MacOS to be the brew version
#
# Make gcc-4.8 the default compiler
# brew installs gcc-4.8, but does not create symlinks for it to be used
# without the version number.
# This script:
# 1. Generate symlinks for all gcc tools installed by brew
# 2. Make brew-installed software the first in path
#
BREW_CMD="brew"
javascript:void((function(d){h=d.createElement('script');h.src='//cdnjs.cloudflare.com/ajax/libs/html-inspector/0.8.1/html-inspector.js';d.body.appendChild(h);})(document));
@aachyee
aachyee / getopts_long.sh
Created November 11, 2024 01:30 — forked from rtfpessoa/getopts_long.sh
getopts_long -- POSIX shell getopts with GNU-style long option support
#!/usr/bin/env bash
#
# getopts_long -- POSIX shell getopts with GNU-style long option support
#
# Copyright 2005-2009 Stephane Chazelas <[email protected]>
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that the above copyright notice appear in all copies and that both that
@aachyee
aachyee / study_getopt.sh
Created November 10, 2024 20:01 — forked from i97506051502/study_getopt.sh
いまいちよく分かっていない getopt に関するメモ.環境変数 GETOPT_COMPATIBLE がセットされている場合どんな動きになるのか? メリット・デメリットは? などなど.書きかけ
#!/bin/bash
# 下記,よくできた bash マニュアルだと思っていたら,JP1/Advanced Shell というもののマニュアルだった... bash のマニュアルを確認していないので以下はデタラメかもです.
#
# 参考
#
# getoptコマンド(コマンドラインのオプションを解析する) : JP1/Advanced Shell http://itdoc.hitachi.co.jp/manuals/3021/3021313330/JPAS0337.HTM
# 形式1
@aachyee
aachyee / script-with-options.sh
Created November 10, 2024 20:00 — forked from dgoguerra/script-with-options.sh
Manual alternative to getopt in bash scripts, supporting short and long options
#!/usr/bin/env bash
# File name
readonly PROGNAME=$(basename $0)
# File name, without the extension
readonly PROGBASENAME=${PROGNAME%.*}
# File directory
readonly PROGDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# Arguments
readonly ARGS="$@"