Skip to content

Instantly share code, notes, and snippets.

View nathanielread's full-sized avatar

Nathan Sandell nathanielread

  • E2open
View GitHub Profile
@mattbell87
mattbell87 / remote-wsl.md
Last active September 28, 2025 15:59
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Proxy jump method

  1. On the host set up OpenSSH for Windows
  2. Run wsl --update to make sure you are running the latest WSL
  3. Open WSL and install another SSH server inside WSL with sudo apt-get install openssh-server
  4. Now run sudo systemctl enable --now ssh to automatically start ssh when WSL starts.
@lukele
lukele / Boot SuperDuper backup in VMWare.md
Last active March 18, 2022 16:42
Boot SuperDuper! backup in VMWare

Boot SuperDuper! backup in VMWare Fusion

It's quite strange that VMWare doesn't expose this feature in the UI directly, but fortunately enough it's pretty easy to do.

  1. Create a new custom virtual machine with macOS 10.14 as guest
  2. Quit VMWare after creating the virtual machine
  3. Change into the virtual machine folder ~/Virtual Machines/<name>.vmwarevm
  4. Connect your external harddrive with your SuperDuper! bootable backup
  5. Use diskutil list to figure out which device number your harddrive was assigned
  6. Create a raw disk using the vmware-rawDiskCreator tool which is linked to the external harddrive:
@snowkidind
snowkidind / README.md
Last active November 11, 2021 16:53
TDAmeritrade API Notes for Node.js

Access to Ameritrade API

notes that may be helpful for node.js devs

What I've gathered is authorization tokens must be earned first. Authorization tokens are good for three months, once you are setup, you will get two tokens which come as long strings, An access_token and a refresh_token. Access tokens are only valid for 30 minutes so you will need to code to refresh the session using the refresh token frequently. When you refresh, you are given a new access token and that is what you use to "login" or pull from the api for the next period. But in order to get the tokens, you will be required to go through some processes to get a valid token that applies to your app. The following text kind of steers you in that direction...

Making an app

On the api site you will need to make an app, where you pick some random name by using some random numbers. It should be automatically generated but it isnt. For this field item, I simply went to https://www.uuidgenerator.net/ and just grabbed the firs

@iscott
iscott / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Last active September 30, 2025 16:45
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

Specs
AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6
@drSeeS
drSeeS / WilliamPOP.py
Created January 18, 2017 16:45
Probabilty of Profit and WilliamsR
import pandas as pd
import numpy as np
import talib
from scipy.stats import ks_2samp
try:
import pandas_datareader.data as web
except ImportError:
@kpmiller
kpmiller / TOS-csv-spreadfinder.py
Last active April 16, 2019 12:36
python 2.7 code that reads csv files saved from thinkorswim and applies a scan criteria to it
#!/usr/bin/python
import csv, json, sys, re, os
import glob
try:
loglevel = int(os.environ["LOGLEVEL"])
except:
loglevel = 1
#!/bin/bash
#
# Blog post @ https://blog.kylemanna.com/sharing/gogo-inflight-wireless-with-openvpn/
#
# Bail on errors
set -e
SERVER_IP=$(host myip.opendns.com. resolver1.opendns.com | awk '/has address/ { print $4 }')
@noelboss
noelboss / git-deployment.md
Last active August 12, 2025 18:16
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@tomdalling
tomdalling / simple_authentication.rb
Created May 23, 2016 12:26
A simple Sinatra app that demonstrates basic authentication
#!/user/bin/env ruby
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'sinatra', '~> 1.4'
gem 'bcrypt', '~> 3.1'
end
require 'sinatra/base'
@akshaymohite
akshaymohite / setting-up-vagrant-virtual-box.md
Last active April 17, 2020 10:53
Setting up Vagrant / Virtual Box