Skip to content

Instantly share code, notes, and snippets.

@rterbush
rterbush / update-route53.sh
Created October 29, 2016 22:16 — forked from d90/update-route53.sh
BASH Script to keep Route53 updated with your current external IP address
#!/bin/bash
# (optional) You might need to set your PATH variable at the top here
# depending on how you run this script
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Hosted Zone ID e.g. BJBK35SKMM9OE
ZONEID="enter zone id here"
# The CNAME you want to update e.g. hello.example.com
@rterbush
rterbush / pairs.py
Created February 28, 2017 05:18 — forked from dat-boris/pairs.py
Quantopian tool for researching pair trading algorithm
"""
A simple tool for researching Pairs based on:
https://www.quantopian.com/clone_notebook?id=57ed7c41144f8837290000da
"""
from datetime import date, timedelta
import matplotlib.pyplot as plt
from statsmodels.tsa.stattools import coint
from zipline import TradingAlgorithm
@rterbush
rterbush / cool_gpu2.sh
Created September 28, 2017 22:15 — forked from squadbox/cool_gpu2.sh
A script to control Nvidia GPU fan speed on headless (non-X) linux nodes
#!/bin/bash
# cool_gpu2.sh This script will enable or disable fixed gpu fan speed
#
# Description: A script to control GPU fan speed on headless (non-X) linux nodes
# Original Script by Axel Kohlmeyer <[email protected]>
# https://sites.google.com/site/akohlmey/random-hacks/nvidia-gpu-coolness
#
# Modified for newer drivers and removed old work-arounds
@rterbush
rterbush / wireless-link-wds.sh
Created October 23, 2017 01:28 — forked from braian87b/wireless-link-wds.sh
How to setup Wireless Links to avoid Wired backbone using WDS on Atheros for OpenWRT / LEDE
from django.db import models
from wagtail.wagtailcore.models import Page
from satchless.item import StockedItem
from wagtail.wagtailimages.edit_handlers import ImageChooserPanel
from wagtail.wagtailadmin.edit_handlers import (TabbedInterface, ObjectList,
PageChooserPanel, FieldPanel,
InlinePanel, MultiFieldPanel)
#from wagtail.wagtailadmin.views.pages import PAGE_EDIT_HANDLERS
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailcore.models import Orderable
@rterbush
rterbush / DownloadFromIB.py
Created December 29, 2021 18:41 — forked from jwsmithers/DownloadFromIB.py
Function to download from IB
from ib_insync import *
import asyncio
import nest_asyncio
async def update_from_IB(stock):
"""
Asynchronous call example to update stocks from Interactive broker.
Args:
stock(str): Stock, I.e. AAPL
@rterbush
rterbush / ssh.ps1
Created April 17, 2023 14:16 — forked from Hashbrown777/ssh.ps1
A workaround for Windows official openssh client not supporting -f nor -N
#accepts all arguments for ssh except command, -N and -f
#command can be piped in
Filter ssh-f {
$N = $False
if (!$_) {
#the same as -N
$_ = 'read'
$N = $True
}
$_ = 'echo SUCCESS;' + $_