Skip to content

Instantly share code, notes, and snippets.

View jamestomasino's full-sized avatar
🎯
Focusing

James Tomasino jamestomasino

🎯
Focusing
View GitHub Profile
@jamestomasino
jamestomasino / tokipona.json
Last active July 15, 2018 17:11
Flashleit Set - Toki Pona Vocabulary
{
"front": "----------------------------------------\n- -\n- -\n- Mi -\n- -\n- -\n----------------------------------------\n",
"back": "----------------------------------------\n- -\n- -\n- Me/My -\n- -\n- -\n----------------------------------------\n",
"level": 1,
"lastReviewed": null
},
{
"front": "----------------------------------------\n- -\n- -\n- Sina -\n- -\n- -\n----------------------------------------\n",
"back": "-------------------------------
@jamestomasino
jamestomasino / bashrc.insults
Created March 22, 2019 16:03
bash insult on error
# source this as part of your bash startup scripts
suicidePostCommand() {
if [ $? -ne 0 ]; then
local INSULT
INSULT[0]="Just what do you think you're doing Dave?"
INSULT[1]="It can only be attributed to human error."
INSULT[2]="That's something I cannot allow to happen."
INSULT[3]="My mind is going. I can feel it."
INSULT[4]="Sorry about this, I know it's a bit silly."
#!/usr/bin/env bash
# credentials for stream
TILDE_USER=""
TILDE_PASS=""
# don't return a * if no files found in glob
shopt -s nullglob
# change to directory where script is and run everything there
@jamestomasino
jamestomasino / digitalocean-config.md
Last active September 22, 2020 16:14
Digital Ocean Droplet setup for Nuxt Blue/Green deploys

Setting up a new digital ocean droplet

  • Create droplet with Ubuntu using special digitalocean key for root access.
  • SSH as root with digitalocean key
  • update and upgrade everything in apt

Setting up user and permissions

  • create 'web' user
  • use strong password
@jamestomasino
jamestomasino / index.php
Created September 26, 2020 13:10
Tomasino.is homepage
<?php
$article = "";
$path = explode('/', $_SERVER['REQUEST_URI'])[1];
$path2 = explode('/', $_SERVER['REQUEST_URI'])[2];
if (! $path) {
$path = shell_exec("shuf -n1 /usr/share/dictd/gcide.index | cut -f1 ");
}
if (($path === "a") || ($path === "an") || ($path === "the")) {
if (isset($path2)) {
A. W. Tozer - The Knowledge of the Holy (1961)
Abir Mukherjee - A Rising Man (2017)
Adele Abbott - Witch is When it All Began (2015)
Adrian Tchaikovsky - Children of Ruin (2019)
Adrian Tchaikovsky - Children of Time (2015)
Agatha Christie - And Then There Were None
Agatha Christie - Miss Marple 01 - Murder at the Vicarage
Agatha Christie - Miss Marple 03 - The Moving Finger
Agatha Christie - Miss Marple 04 - A Murder is Announced
Agatha Christie - Miss Marple 05 - They Do it With Mirrors