Skip to content

Instantly share code, notes, and snippets.

View llbbl's full-sized avatar

Logan Lindquist llbbl

View GitHub Profile
@llbbl
llbbl / recent_month.sh
Created June 15, 2022 20:31
get recent directories from last month
find . -type d -mtime -30 -maxdepth 1 -mindepth 1
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")
@llbbl
llbbl / install_ghost.j2
Created May 2, 2022 15:02
install ghost, so easy, they said
#!/bin/zsh
if [ ! -d "{{ghost_install_dir}}" ]
then
echo "creating {{ghost_install_dir}}"
mkdir {{ghost_install_dir}}
fi
cd {{ghost_install_dir}}
@llbbl
llbbl / sync_5etools_latest.sh
Created April 24, 2022 21:05
sync 5etools content script
#!bin/bash
# sync_5etools_latest.sh
# sync 5etools content script
SERVER_USER=
SERVER_HOST=
SERVER_PATH=
LOCAL_DIR=5etools-mirror-1
@llbbl
llbbl / fix_openssl_catalina.sh
Last active November 3, 2023 06:05
fix missing openssl files in catalina
#!/bin/bash
echo 'update brew'
brew update
echo 'upgrade brew'
brew upgrade
@llbbl
llbbl / Safari Needs WebP Support
Created August 16, 2019 21:24
Safari Needs WebP Support
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
#!/usr/bin/env python3
import collections
import datetime
import pprint
import click
import jinja2
import requests
@llbbl
llbbl / cloudflare.conf
Last active December 3, 2022 20:34
nginx conf file for setting actual IPs behind cloudflare
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;
@llbbl
llbbl / .screenrc
Last active February 24, 2018 19:39 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# 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
function ec2-ssh () {
ssh -i ~/.ssh/$2 -l ubuntu $(aws ec2 describe-instances --filter Name=instance-id,Values=$1 | jq '.Reservations[0].Instances[0].PublicIpAddress' | tr -d '"')
}