Skip to content

Instantly share code, notes, and snippets.

@juniorctl
juniorctl / errors.txt
Created March 7, 2024 19:48 — forked from benjaminoakes/errors.txt
BeOS (NetPositive) haiku error messages
Not a pretty sight
When the web dies screaming loud
The site is not found.
Morning and sorrow
404 not with us now
Lost to paradise.
@juniorctl
juniorctl / ffcapture
Created February 3, 2021 22:36 — forked from seanbutnotheard/ffcapture
FFMPEG Screen capture/stream script
#!/bin/bash
#LICENSE
#To the extent possible under law, the author(s) have dedicated all
#copyright and related and neighboring rights to this software to the
#public domain worldwide. This software is distributed without any warranty.
#See <http://creativecommons.org/publicdomain/zero/1.0/>.
# ffcapture, a hacky script to stream/capture your desktop or a window
# REQUIRES ffmpeg, xwininfo and bc to be installed!
@juniorctl
juniorctl / tmux-cheatsheet.markdown
Created March 4, 2019 14:40 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@juniorctl
juniorctl / s3Sync.sh
Created July 19, 2018 15:59 — forked from kellyrmilligan/s3Sync.sh
Sync files to s3 and set cache control headers
#!/bin/bash
if [[ "$1" != "" ]]; then
S3BUCKETNAME="$1"
else
echo ERROR: Failed to supply S3 bucket name
exit 1
fi
aws s3 sync build s3://$S3BUCKETNAME --delete --cache-control max-age=31536000,public
@juniorctl
juniorctl / install-php7.2-mcrypt.sh
Created May 29, 2018 18:32 — forked from arzzen/install-php7.2-mcrypt.sh
Install PHP 7.2 MCrypt extension
## How to install mcrypt in php7.2
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
##
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php
@juniorctl
juniorctl / keybase.md
Last active September 27, 2017 23:02
Keybase for your face

Keybase proof

I hereby claim:

  • I am juniorctl on github.
  • I am juniorctl (https://keybase.io/juniorctl) on keybase.
  • I have a public key ASDbLMZK7mP1puFeUVG192iWOQTGQOBzmkuZQ0fJYBmraAo

To claim this, I am signing this object:

@juniorctl
juniorctl / installing-arch-linux-on-a-vultr-server.md
Last active May 7, 2020 04:11
Installing Arch Linux On a Vultr Server (2017)

Installing Arch Linux On a Vultr Server

This is a minimal installation guide targeted to get Arch Linux running on Vultr. For simplicity, 'time zone', 'hostname', 'locale' and 'initramfs' are omited, you can configure them later by yourself.

Partition the disks

For simplicity, we use single root partition.

# fdisk /dev/vda
@juniorctl
juniorctl / iptables-port-forward.sh
Last active April 27, 2016 19:10 — forked from Marko-M/iptables-port-forward.sh
Forward Vagrant forwarded ports to standard ports using iptables
#!/bin/bash
# Forward relevant Vagrant forwarded ports to standard ports using iptables (adjust 8080, 8443).
# To make persistent install and use "iptables-persistent" package. Just do a
# "sudo service iptables-persistent save" and service will reload saved rules on each boot.
sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 8080
sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 443 -j REDIRECT --to-ports 8443
sudo iptables -L -n -t nat
# confirm you can access the internet
if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "200 OK" ]]; then
echo "Your Internet seems broken. Press Ctrl-C to abort or enter to continue."
read
fi
# make 2 partitions on the disk.
parted -s /dev/sda mktable msdos
parted -s /dev/sda mkpart primary 0% 100m
parted -s /dev/sda mkpart primary 100m 100%