Skip to content

Instantly share code, notes, and snippets.

View nesosuke's full-sized avatar
💭
🧻 Writing graduate thesis draft

nesosuke nesosuke

💭
🧻 Writing graduate thesis draft
View GitHub Profile
@nesosuke
nesosuke / curl_pubkey_fromGitHub.sh
Created December 9, 2022 12:07
Obtain pubkeys from github.com/<username>.keys into ~/.ssh/authorized_keys
#!/bin/bash
USERNAME=nesosuke
# Backup the previous authorized_keys
cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.bak
# Get the public key from GitHub
curl -s http://github.com/$USERNAME.keys > ~/.ssh/authorized_keys
# If authorized_keys is empty, restore the previous authorized_keys
@nesosuke
nesosuke / mastodon_db_dump.sh
Last active November 25, 2022 10:18
mastodon_db_dump.sh
#!/bin/bash
DB_NAME=mastodon_production
DUMPTO=/home/mastodon/db_backup/${DB_NAME}
DUMPNAME=$DUMPTO/${DB_NAME}_$(date +%Y%m%d).dump
# if the directory doesn't exist, create it
if [ ! -d $DUMPTO/$DB_NAME ]; then
mkdir -p $DUMPTO/$DB_NAME
fi
version: '3'
services:
web:
image: node:latest
ports:
- 5173:5173
volumes:
- .:/app
working_dir: /app
command: bash -c "yarn && yarn watch:nature --host 0.0.0.0"
@nesosuke
nesosuke / setting.json
Created August 29, 2022 12:10
WindowsTerminal
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command": "paste",
"keys": "ctrl+v"
},
{
@nesosuke
nesosuke / Microsoft.PowerShell_profile.ps1
Last active August 15, 2022 05:16
Custom pwsh prompt
oh-my-posh.exe init pwsh --config ~/custom.omp.json | Invoke-Expression
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Documents All</title>
</head>
<body>
<h1>Documents All</h1>
@nesosuke
nesosuke / proxy.pac
Created May 24, 2019 04:40
socks proxy (:10080)
function FindProxyForURL(url, host) {
return "SOCKS localhost:10080";
}
### Keybase proof
I hereby claim:
* I am nesosuke on github.
* I am nesosuke (https://keybase.io/nesosuke) on keybase.
* I have a public key ASBVSbDtK-wLK6_WDDffdfRAtNgwSphRDJF0LuoLP78KZAo
To claim this, I am signing this object: