mongosh
rs [direct: secondary] test> db.adminCommand( { logRotate : "server" } )
cd /var/log/mongodb
sudo -u mongodb gzip [[MONGODB_LOG_FILENAME]]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Database } from '@/lib/supabase-types' | |
import { createClient } from '@supabase/supabase-js' | |
export const SUPABASE_NEXTJS_CACHE_TAG = "supabase" | |
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL! | |
const supabaseKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY! | |
export const client = createClient<Database>( | |
supabaseUrl, |
sudo vim /etc/postgresql/12/main/pg_hba.conf
host <db_name> <user_name> 0.0.0.0/0 password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🌞 Morning 22 commits ▌░░░░░░░░░░░░░░░░░░░░ 2.9% | |
🌆 Daytime 302 commits ████████▍░░░░░░░░░░░░ 40.2% | |
🌃 Evening 377 commits ██████████▌░░░░░░░░░░ 50.1% | |
🌙 Night 51 commits █▍░░░░░░░░░░░░░░░░░░░ 6.8% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.MagicHole = new Proxy(function () { console.log('MagicHole:call', arguments); return window.MagicHole; }, { | |
get(target, name) { | |
console.log('MagicHole:get', name); | |
return window.MagicHole; | |
}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# because I am too lazy to initialize linux server anymore | |
export DOTFILES_REPO_URL=https://github.com/susemeee/dotfiles.git | |
sudo apt update && sudo apt install -y zsh git htop git vim build-essential && git clone $DOTFILES_REPO_URL && cd dotfiles && ./install && cd ~ | |
# tmuxconf | |
cd ~ && git clone https://github.com/gpakosz/.tmux.git && ln -s -f .tmux/.tmux.conf && cp .tmux/.tmux.conf.local . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$src = ".\goog" | |
$dest = ".\goog2" | |
$num=1 | |
Get-ChildItem $src -Recurse -Include *.gif, *.jpg, *.jpeg, *.png, *.bmp, *.heic, *.heif, *.mov, *.mp4, *.webp, *.avi, *.tif, *.flv, *.mts | ForEach-Object { | |
$nextName = Join-Path -Path $dest -ChildPath $_.name | |
while(Test-Path -Path $nextName) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103.10.171.21 | |
103.120.226.54 | |
103.136.43.65 | |
103.233.83.220 | |
103.233.83.251 | |
103.86.176.107 | |
103.9.76.178 | |
104.143.43.10 | |
104.160.43.209 | |
104.244.153.22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu. | |
#See the prefix path and compile options if edits are needed to suit your needs. | |
#install required things from apt | |
installLibs(){ | |
echo "Installing prerequisites" | |
sudo apt-get update | |
sudo apt-get -y --force-yes install nettle-dev cmake tcl autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 법인번호 오류검증 공식 | |
// 법인번호에서 마지막 자리를 제외한 | |
// 앞에 모든 자리수를 1과 2를 순차적으로 곱한다. | |
// 예) 1234567890123 | |
// ************ | |
// 121212121212 | |
// 각각 곱한 수를 모든 더하고 10으로 나눈 나머지 수를 구한다. | |
// (각각더한수 % 10) | |
// 나눈 나머지 수와 법인번호 마지막 번호가 일치하면 검증일치 | |
function isValidCorporationId(value = '') { |
NewerOlder