Skip to content

Instantly share code, notes, and snippets.

View naskya's full-sized avatar
💤
hibernating

naskya naskya

💤
hibernating
View GitHub Profile
sudo apt install -y curl git build-essential
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
sudo corepack enable
sudo apt install -y postgresql-common
sudo sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -i -v 15;
sudo apt install -y curl ca-certificates gnupg2 lsb-release
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt update

Keybase proof

I hereby claim:

  • I am naskya on github.
  • I am naskya_ (https://keybase.io/naskya_) on keybase.
  • I have a public key whose fingerprint is 4307 1F73 3315 AA1C EB7C 72E5 164D FF24 E2D4 0139

To claim this, I am signing this object:

/* last update: 2022-08-03 */
#ifndef DEBUG_PRINT_HPP
#define DEBUG_PRINT_HPP
#define INCLUDED(n) ((defined _GLIBCXX_##n) || (defined _LIBCPP_##n))
#if __cplusplus < 201703L
# warning Please use C++17 (or later version).
#endif
@naskya
naskya / show_context_on_twitter.txt
Last active January 2, 2021 07:17
ツイートのページからその人の前後のツイートを表示するブックマークレット (日本語で使用している場合を想定)
javascript:(function(){var e=window,g=e.open,h=/\/([a-zA-Z0-9_]+)\/status\/.+/.exec(location.pathname)[1],a=(new RegExp('<a href="'+location.pathname+".*?>.*?>(.*?)</span>","")).exec(document.documentElement.innerHTML),b=RegExp("\u5348([\u524d\u5f8c])([0-9]{1,2}):([0-9]{2}) \u00b7 ([0-9]{4})\u5e74([0-9]{1,2})\u6708([0-9]{1,2})\u65e5","u").exec(String(a[1]));a=Number(b[4]);var c=Number(b[5]),d=Number(b[6]),f=Number(b[2])+12*("\u5f8c"===b[1]);b=Number(b[3]);time=24===f?(12===c&&31===d?String(a+1)+"-01-01":(2===c?28>d?0:29===d||0!==a % 400&&(0===a % 100||0!==a % 4):4===c||6===c||9===c||11===c?30===d:31===d)?String(a)+"-"+String(c+1).padStart(2,"0")+"-01":String(a)+"-"+String(c).padStart(2,"0")+"-"+String(d+1).padStart(2,"0"))+"_01:"+String(b).padStart(2,"0")+":00_JST":String(a)+"-"+String(c).padStart(2,"0")+"-"+String(d).padStart(2,"0")+"_"+String(f+1).padStart(2,"0")+":"+String(b).padStart(2,"0")+":00_JST";g.call(e,"https://twitter.com/search?q=from:"+h+"+include:nativeretweets+until:"+time+"&f=live")})();
@naskya
naskya / open_contest_pages.txt
Created May 31, 2020 17:24
AtCoderのコンテストのトップページから印刷用問題文・自分の提出・順位表を一度に開くブックマークレット(ポップアップブロックを解除する必要があります)
javascript:(function(){const a=location.href.match(/https:\/\/atcoder.jp\/contests\/([a-zA-Z0-9_]*)/)[1];window.open("https://atcoder.jp/contests/"+a+"/standings");window.open("https://atcoder.jp/contests/"+a+"/submissions/me");window.open("https://atcoder.jp/contests/"+a+"/tasks_print");})();