Skip to content

Instantly share code, notes, and snippets.

@wheresjames
wheresjames / extract-words.js
Created February 18, 2019 18:40
Splits words and creates javascript / JSON friendly array
#!/usr/bin/env nodejs
//-------------------------------------------------------------------------------------------------
// Developer: Robert Umbehant
//-------------------------------------------------------------------------------------------------
// Splits the input file into words, filters the words, and outputs as a javascript / JSON friendly
// array of strings.
//-------------------------------------------------------------------------------------------------
var fs = require('fs');

Python logging class

bash history management

Gradle Build Script

GCloud site publishing script

@wheresjames
wheresjames / buildwrtc.bat
Created July 23, 2020 09:54
Build Webrtc for WinRT
@echo off
setlocal ENABLEDELAYEDEXPANSION
set p1=%1
if "!p1!"=="" set "p1=x64"
REM #----------------------------------------------------------------
REM # https://github.com/microsoft/winrtc
REM #----------------------------------------------------------------
REM # RUN
#!/bin/bash
# Compress web site
#--------------------------------------------------------------------------------------------------
USAGE="Usage: ./compress-web.sh <source-dir> <destination-dir>"
SCRIPT_NAME=$(basename $0)
SCRIPT_PATH=$(dirname "$(readlink -f "$0")")
@wheresjames
wheresjames / npm-global-install.js
Last active December 23, 2020 20:57
Install global npm dependencies from package.json
#!/usr/bin/node
const fs = require('fs');
const path = require('path');
const shell = require('shelljs');
const cp = require('child_process');
const c_Usage = "USAGE: ./npm-global-install.js <path-to-package.json>";
const c_start_time = new Date().getTime() / 1000;
@wheresjames
wheresjames / gdrive.py
Created January 3, 2021 13:32
Python script to sync local folder to google drive
#!/usr/bin/env python3
from __future__ import print_function
import os
import sys
import time
import json
import random
import inspect
import argparse
@wheresjames
wheresjames / linode-deploy.sh
Created January 12, 2021 19:40
Deploy apache server to a Linode instance
#!/bin/bash
#--------------------------------------------------------------------------------------------------
#
# Examples
#
# Setup new instance
# $ ./linode-deploy.sh create-setup <username> newserver.example.com
#
# After you've added the IP address to your DNS, get a lets encrypt cert with