This file contains hidden or 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 fs from 'fs/promises'; | |
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); | |
interface ProcessResult { | |
success: boolean; | |
error?: Error; |
This file contains hidden or 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
find . -type d -mtime -30 -maxdepth 1 -mindepth 1 |
This file contains hidden or 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
sql = "INSERT INTO likes ( user_id, post_id ) VALUES ( %s, %s )" | |
val = [(4, 5), (3, 4)] | |
cursor = connection.cursor() | |
cursor.executemany(sql, val) | |
connection.commit() | |
print("query executed") |
This file contains hidden or 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/zsh | |
if [ ! -d "{{ghost_install_dir}}" ] | |
then | |
echo "creating {{ghost_install_dir}}" | |
mkdir {{ghost_install_dir}} | |
fi | |
cd {{ghost_install_dir}} |
This file contains hidden or 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 | |
# sync_5etools_latest.sh | |
# sync 5etools content script | |
SERVER_USER= | |
SERVER_HOST= | |
SERVER_PATH= | |
LOCAL_DIR=5etools-mirror-1 |
This file contains hidden or 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 | |
echo 'update brew' | |
brew update | |
echo 'upgrade brew' | |
brew upgrade |
This file contains hidden or 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
It has been brought up before, but creating a new post to start the conversation again. | |
* 80% of the current global web traffic supports WebP | |
* All the other current browsers support WebP | |
* If Safari on iOS and Mac were to support it, we would see an additional 12-14% of the entire web traffic that supports WebP [bringing total to ~94%] | |
* Apple is the only/last of the major browser vendors to not support WebP | |
* Chrome has had at least partial support of WebP since 2011 almost 2 years before Blink was forked from Webkit | |
* WebP was released 8 (almost 9) years ago |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import collections | |
import datetime | |
import pprint | |
import click | |
import jinja2 | |
import requests |
This file contains hidden or 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
set_real_ip_from 103.21.244.0/22; | |
set_real_ip_from 103.22.200.0/22; | |
set_real_ip_from 103.31.4.0/22; | |
set_real_ip_from 104.16.0.0/12; | |
set_real_ip_from 108.162.192.0/18; | |
set_real_ip_from 131.0.72.0/22; | |
set_real_ip_from 141.101.64.0/18; | |
set_real_ip_from 162.158.0.0/15; | |
set_real_ip_from 172.31.0.0/18; | |
set_real_ip_from 172.64.0.0/13; |
This file contains hidden or 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
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
NewerOlder