Skip to content

Instantly share code, notes, and snippets.

Avatar
😇

kPherox kphrx

😇
View GitHub Profile
View openpgp.md
View docker-compose-outdated.pl
#!/usr/bin/env perl
my $current = `docker compose version`;
use POSIX qw(uname);
my @uname = uname();
my $os = lc($uname[0]);
my $arch = $uname[4];
use JSON::PP;
View primevideo-autohide-nextupcard.user.js
// ==UserScript==
// @name Amazon Prime Video auto hide the next up card
// @namespace http://tampermonkey.net/
// @version 1.3.4
// @author kPherox
// @match https://www.amazon.co.jp/gp/video/*
// @match https://www.amazon.co.jp/Amazon-Video/*
// @updateURL https://gist.github.com/kphrx/2d7c91067c42453ec88a65e2202c2144/raw/primevideo-autohide-nextupcard.user.js
// @downloadURL https://gist.github.com/kphrx/2d7c91067c42453ec88a65e2202c2144/raw/primevideo-autohide-nextupcard.user.js
// @grant none
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

View ubuntu_minimal_docker_nftables_install.bash
echo 'APT::Install-Recommends "false";
APT::Install-Suggests "false";' | sudo tee /etc/apt/apt.conf.d/00install-recommends > /dev/null
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce nftables
sudo update-alternatives --set iptables $(which iptables-nft)
sudo update-alternatives --set ip6tables $(which ip6tables-nft)
sudo usermod -aG docker $(whoami)
@kphrx
kphrx / feelcycle-diff-sheet.user.js
Last active May 14, 2021 — forked from owatan/feelcycle-diff-sheet.js
FEELCYCLE の予約ページで難易度を表示する userscript
View feelcycle-diff-sheet.user.js
// ==UserScript==
// @name feelcycle-diff-sheet.js
// @namespace http://tampermonkey.net/
// @version 0.3
// @description FEELCYCLE の予約ページで難易度を表示する userscript
// @author owatan
// @match https://m.feelcycle.com/reserve
// @icon https://m.feelcycle.com/favicon.png
// @grant none
// ==/UserScript==
@kphrx
kphrx / twitter_userid_crawl.sh
Created Apr 7, 2021
ツイッターのユーザーID収集。一回の実行で90000の範囲を探すのに10分ぐらいかかる
View twitter_userid_crawl.sh
#!/bin/bash
# ##Requirements
# - twurl
# - Ruby
# - SQLite 3
set -e
# cronとかで使えるようにsqliteとruby、ruby gemsのパスを通す。これはmacOSのHomebrewで入れた場合
@kphrx
kphrx / niconico-user-page-dark-theme.user.css
Last active Apr 8, 2021
ニコニコ動画のマイページとユーザーページを暗くするやつ。stylish: https://userstyles.org/styles/190808
View niconico-user-page-dark-theme.user.css
/* ==UserStyle==
@name niconico user page dark theme
@namespace kpherox.dev
@version 1.2.0
@author kPherox <admin@mail.kr-kp.com>
==/UserStyle== */
@-moz-document url-prefix("https://www.nicovideo.jp/my"),
url-prefix("https://www.nicovideo.jp/user"),
url-prefix("https://www.nicovideo.jp/series") {
body.BaseLayout {
View minecraft-forge-downloader.pl
#!/usr/bin/perl
use feature qw(say);
use strict;
use warnings;
use Cwd 'abs_path';
use File::Basename 'dirname';
use File::Spec;
use Getopt::Long 'GetOptions';
use JSON::PP;
View gist:42582a90aa0d0125beef326a655cdf0c

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor