Skip to content

Instantly share code, notes, and snippets.

View sposterkil's full-sized avatar

Sam Osterkil sposterkil

  • Stateless
  • Boulder, CO
View GitHub Profile
@sposterkil
sposterkil / refreshUrl.py
Created June 10, 2016 23:30
A little python script to refresh a given URL every 10 seconds
#! /usr/bin/env python3
import webbrowser
from time import sleep
url = input('Input the URL to reload, including "http://: ')
while True:
print("refreshing...")
webbrowser.open(url, new=0)

Keybase proof

I hereby claim:

  • I am sposterkil on github.
  • I am spost (https://keybase.io/spost) on keybase.
  • I have a public key ASDabfWhlyQ0Zlj9vMnN_P-htAWS3oZJmnDngLL5QXGgfQo

To claim this, I am signing this object:

@sposterkil
sposterkil / gist:b989cb00e486fe6bc2c7acf5a63a4d1e
Created September 17, 2022 06:22
eade88c3-fcf5-4fe6-acab-2fa2e8c2d344
eade88c3-fcf5-4fe6-acab-2fa2e8c2d344
@sposterkil
sposterkil / mvhp.py
Created May 17, 2013 01:32
mvhp-joe
#!/bin/env python
# -*- coding: utf-8 -*-
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
import asyncore
Balancing Book
0eNrtndvOHceVpF/F4DW3keuQh9Ld9MW8xGAgSG6Oh7BMChLVaKOx330oiz+paVZlroyMJClvXhmW7PxrH2pX5oqIL/7r2fc//PLix59evnrz7fevX//t2Tf/9eGf/Pzsm//1u//66797+ZfXr377xz+//Our73749Z+9+cePL5598+zlmxd/f/b82avv/v7rf3vxnz/+9OLnn29vfvru1c8/vv7pze37Fz+8eXZ//uzlq39/8Z/PvpH7/37+7MWrNy/fvHzx24r//C//+PbVL3///sVPb/8Ho7WeP/vx9c9v/++vX/16FW+XTM+f/ePZNze5359/tJqCq50uZuBi6f7ri/7nG/XN797X589++O7t/+3tP5Nv5dvvv/vhu1d/eftnnj/7jxc//fzPNUqrqk2OVPXDO5h+vbJtn87z8CI///jDyzdv3l7wh/+7fukf7k06y9n1S/x4ofTn/PTZfrySoxcm42+Kxr8p8lDflKfPVmNflc5nK+8+2xvpV+CmnSub/668/w4/f/bvL3968Zff/lU5WTujt9vplRbqzVvRDzj9/69bT9ZuyKd9epUH+mGf/i5IAj/s89UEXO2/fXP8bO2ZG+bdU+7PefzJiKEf++lXUhz9fM6Xy+A7quN7UdDb56O1R08Iiz8hdP0JcfLjPvNsuHzA7HhC6NQTYuW30riPL/ghcbpa5j0My8zPRHelStt9NXzPP7q1PH5r2WNtvt7dWka9tYx7axn11rI7ZcfVe+MK9yeuwsvJfXWX9f7m19g2C/0ZOdli9X7cflvpo61LiW23rleW7ssVxbeV460bfECJ7At9fV9YODuvW3wzW8C7MgUuvFK39A280vN74eAcEM5etyZkE6HjD0vhk7+Njx+KPooiaxvw+3C+FXXwW3D+9EUPNTbeD+X4fsi/HjUW5pY2ddbo3InafXo69RCUuYegAu03SMOn3ufZqKezA9lmEPZCOvG0FvQbnFjbIQs//A3YWybWsEnC+4iMfLvP
@sposterkil
sposterkil / ...txt
Created June 19, 2017 16:50
#just_js_things
W20170619-10:45:51.965(-6)? (STDERR) /home/spost/.meteor/packages-from-server/10.47.10.117X3000/meteor-tool/.1.4.3_2.1td3pqz++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20170619-10:45:51.966(-6)? (STDERR) throw(ex);
W20170619-10:45:51.967(-6)? (STDERR) ^
W20170619-10:45:51.967(-6)? (STDERR)
W20170619-10:45:51.967(-6)? (STDERR) Error: Cannot find module 'semver'
W20170619-10:45:51.968(-6)? (STDERR) at Function.Module._resolveFilename (module.js:325:15)
W20170619-10:45:51.968(-6)? (STDERR) at Function.Module._load (module.js:276:25)
W20170619-10:45:51.968(-6)? (STDERR) at Module.require (module.js:353:17)
W20170619-10:45:51.968(-6)? (STDERR) at require (internal/module.js:12:17)
W20170619-10:45:51.969(-6)? (STDERR) at Object.<anonymous> (/home/spost/Code/DMA-git/ui_html5_admin/src/main/meteor/.meteor/local/isopacks/routes/npm/node_modu
@sposterkil
sposterkil / po.java
Last active August 18, 2016 18:43
Page Object Example
usersPage
.clickAddUserButton() // returns AddUserPage
.enterName("Sam Osterkil") // returns AddUserPage
.enterPassword("Password") // returns AddUserPage
.clickSubmit() // returns AddUserOutcome, which is just an object with "expectValid" and "expectError" methods
.expectValid() // returns UsersPage
.selectUserFromList("Sam Osterkil") // returns UsersPage
.clickEditUserButton() // returns EditUserPage
.enterPassword("") // returns EditUserPage
.clickSubmit() // returns EditUserOutcome, which is just an object with "expectValid" and "expectError" methods
@sposterkil
sposterkil / modernizer.py
Created November 12, 2013 17:59
EECS293 CSV translation project
#!/usr/bin/env python
import fileinput
import re
import sys
def _prepare_line_list(line):
line_list = re.split("\s+", line)
# Use of re.split adds an empty element to the list
del line_list[len(line_list) - 1]
@sposterkil
sposterkil / mccabe_modernizer.py
Created November 8, 2013 19:57
Demo of McCabe complexity moving things into a separate function
def prepare_line_list(line):
line_list = re.split("\s+", line)
# Use of re.split adds an empty element to the list
del line_list[len(line_list) - 1]
# Add empty field if we don't have a middle name
if len(line_list) is not 7:
line_list.insert(3, "")
@sposterkil
sposterkil / Despereaux
Created September 13, 2013 22:17
Mouse instance named Despereaux, because literary references.
else:
despereaux = Mouse(initial_cell)
done = False
visited_cells = []
route = MazeRoute()
while (despereaux.can_travel() and
not despereaux.current_cell in visited_cells):
if despereaux.current_cell in self._cells:
visited_cells.append(despereaux.current_cell)
else: