Skip to content

Instantly share code, notes, and snippets.

View rossluebe's full-sized avatar

Ross Luebe rossluebe

View GitHub Profile
javascript:(function()%7Bvar%20images%20%3D%20document.querySelectorAll('meta%5Bname%3D%22og%3Aimage%22%5D%2Cmeta%5Bproperty%3D%22og%3Aimage%22%5D')%3Bif%20(!images.length)%20%7Breturn%3B%7Dvar%20el%20%3D%20document.createElement('div')%3BObject.assign(el.style%2C%20%7Bposition%20%20%20%20%20%20%20%3A%20'fixed'%2Ctop%20%20%20%20%20%20%20%20%20%20%20%20%3A%200%2Cleft%20%20%20%20%20%20%20%20%20%20%20%3A%200%2CzIndex%20%20%20%20%20%20%20%20%20%3A%20'2147483647'%2Cwidth%20%20%20%20%20%20%20%20%20%20%3A%20'400px'%2Cheight%20%20%20%20%20%20%20%20%20%3A%20'100%25'%2Coverflow%20%20%20%20%20%20%20%3A%20'scroll'%2CbackgroundColor%3A%20'white'%7D)%3Bfor%20(var%20i%20%3D%200%2C%20len%20%3D%20images.length%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7Bvar%20img%20%3D%20new%20Image()%3Bimg.src%20%3D%20images%5Bi%5D.content%3BObject.assign(img.style%2C%20%7Bdisplay%3A%20'block'%2Cwidth%20%20%3A%20'380px'%2Cheight%20%3A%20'auto'%2Cmargin%20%3A%20'20px%20auto'%7D)%3Bel.appendChild(img)%3B%7Dfunction%20closePanel(event)%20%7Bif%20(1%2
// paste in your console
speechSynthesis.onvoiceschanged = function() {
var msg = new SpeechSynthesisUtterance();
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0];
msg.text = Object.keys(window).join(' ');
this.speak(msg);
};
@ericandrewlewis
ericandrewlewis / gist:95239573dc97c0e86714
Last active December 12, 2023 09:52
Setting up a WordPress site on AWS

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

#!/bin/bash
###################
# Access to Tools #
###################
# Variables
## get current directory path
pushd `dirname $0` > /dev/null
@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else