Skip to content

Instantly share code, notes, and snippets.

View llbbl's full-sized avatar

Logan Lindquist llbbl

View GitHub Profile
@llbbl
llbbl / awesome-php.md
Last active April 5, 2024 09:51 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries and Resources

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Categories

  • Composer
  • Composer Related
  • Frameworks
  • Micro Frameworks
@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 / 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;
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
@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 / gist:b08ed19281c06483242b
Last active March 9, 2022 05:15
Howto Add PhpStorm to Ubuntu Unity Launcher

PhpStorm 7.0x

Create a file ~/.local/share/applications/jetbrains-phpstorm.desktop

With the following value:

@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