Skip to content

Instantly share code, notes, and snippets.

@8secz-johndpope
8secz-johndpope / .apsisrc
Created November 4, 2020 08:46 — forked from wkirby/.apsisrc
Apsis OSX Setup
# Node
nodesize() {
find . -name "node_modules" -type d -prune -print | xargs du -chs
}
nodenuke() {
echo "This command will recursively delete node_modules from your current directory."
echo "Continue (y/n)?"
read CONT
@8secz-johndpope
8secz-johndpope / config
Created July 21, 2020 05:34
~/.ssh/config file
# --- Sourcetree Generated ---
Host 8secz-johndpope-GitHub
HostName github.com
User 8secz-johndpope
PreferredAuthentications publickey
IdentityFile /Users/johnpope/.ssh/8secz-johndpope-GitHub
UseKeychain yes
AddKeysToAgent yes
# ----------------------------
@8secz-johndpope
8secz-johndpope / ColladaAnimationForXcode.py
Created May 29, 2020 11:27 — forked from joncardasis/ColladaAnimationForXcode.py
Convert Collada (.DAE) animation files for Xcode Scenekit Animation use by removing unnecessary data.
#!/usr/local/bin/python
# Jonathan Cardasis, 2018
#
# Cleans up a collada `dae` file removing all unnessasary data
# only leaving animations and bone structures behind.
# Combines multiple animation sequences into a single animation
# sequence for Xcode to use.
import sys
import os
import re
Predicting Animation Skeletons for 3D Articulated Models via Volumetric Nets

Setup Mac OS X

Edit: I've done the same process every couple years since 2013 (Mountain Lion, Mavericks and High Sierra).

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the process, but TBH I have this laptop for almost 3yrs and this is the first

@8secz-johndpope
8secz-johndpope / jslint-watch.sh
Created January 10, 2020 05:30 — forked from cristianobecker/jslint-watch.sh
JSLint watch without gulp or grunt
# Ubuntu: apt-get intall entr
jslint-watch() {
local folder=$(test "x$1" != x && echo "$1" || echo .)
local files="find $folder -type f -name '*.js'"
local modified='$('"$files"' -printf "%T+ %p\n" | sort -r | head -1 | cut -d" " -f2)'
eval $files | entr sh -c 'jslint '"$modified"' --color'
}
# MacOS: brew install entr
import os
import json
import math
import numpy as np
from scipy.spatial.distance import cosine, euclidean
from sklearn import preprocessing
from fastdtw import fastdtw
from scipy import interpolate
from operator import add
@8secz-johndpope
8secz-johndpope / httpd.conf
Last active March 28, 2020 06:00
Extra steps to run multiple websites on one ec2 box.
I don't know why bitnami is slow to start my wordpress site (on first load) / godaddy works fine.
These extroneous steps took more than day of faffing around, but site is working fast.
N.B. cloudcformation template script has been updated to specify ec2-user not root / suitable for AMI images.
N.B. ubuntu doesn't allow you to adjust cpu down the track so go AMI out of the box.
I took some extra steps to get nginx running to allow multiple sites on same box
attention to
DocumentRoot "/var/www/html/wordpress" to avoid the wordpress subdirectory listing otherwise you have this cooky /wordpress subdirectory you need to navigate to.
AWSTemplateFormatVersion: 2010-09-09
Description: >-
AWS CloudFormation Sample Template WordPress_Multi_AZ: WordPress is web
software you can use to create a beautiful website or blog. This template
installs a highly-available, scalable WordPress deployment using a multi-az
Amazon RDS database instance for storage. It demonstrates using the AWS
CloudFormation bootstrap scripts to deploy WordPress. **WARNING** This
template creates an Amazon EC2 instance, an Application Load Balancer and an
Amazon RDS database instance. You will be billed for the AWS resources used if
you create a stack from this template.