Skip to content

Instantly share code, notes, and snippets.

View tschuy's full-sized avatar

Evan Tschuy tschuy

  • Indent
  • Berkeley, CA
View GitHub Profile
@tschuy
tschuy / bootstrap.sh
Last active December 13, 2019 01:17 — forked from chancez/bootstrap.sh
#!/bin/bash
set -u
set -x
FLUX_GIT_DEPLOY_KEY_SECRET=flux-git-deploy
FLUX_DEPLOY_KEY_PATH="${FLUX_DEPLOY_KEY_PATH:?}"
FLUX_GIT_REPO="${FLUX_GIT_REPO:-git@github.com:chancez/flux-get-started.git}"
HELM_BIN="${HELM_BIN:-helm2}"
@tschuy
tschuy / output
Last active March 14, 2019 23:20
vpus by role
$ curl "http://127.0.0.1:8001/api/v1/namespaces/metering-tschuy-test/services/https:reporting-operator:http/proxy/api/v1/reports/get?name=compute-vcpus-by-role-five-min&namespace=metering-tschuy-test&format=json" | jq
...
{
"period_end": "2019-03-14T21:20:00Z",
"period_start": "2019-03-14T21:15:00Z",
"vcpu_core_seconds": 14400
},
{
"period_end": "2019-03-14T21:25:00Z",
"period_start": "2019-03-14T21:20:00Z",
@tschuy
tschuy / output
Last active March 14, 2019 23:24
nodes by type and role
(metering:metering-tschuy) operator-metering/telemeter/new (master) → curl "http://127.0.0.1:8001/api/v1/namespaces/metering-tschuy/services/https:reporting-operator:http/proxy/api/v1/reports/get?name=compute-nodes-by-type-five-min&namespace=metering-tschuy&format=json" | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 257 100 257 0 0 924 0 --:--:-- --:--:-- --:--:-- 927
[
{
"instance_type": "n1-standard-8",
"node_seconds": 1800,
"period_end": "2019-03-11T22:05:00Z",
"period_start": "2019-03-11T22:00:00Z"
2017/12/14 13:34:48 SUCCESS in 2.511355ms
2017/12/14 13:34:48 SUCCESS in 2.485008ms
2017/12/14 13:34:48 SUCCESS in 2.523402ms
2017/12/14 13:34:49 SUCCESS in 2.529224ms
2017/12/14 13:34:49 SUCCESS in 2.397803ms
2017/12/14 13:34:49 SUCCESS in 2.370412ms
2017/12/14 13:34:49 SUCCESS in 2.465489ms
2017/12/14 13:34:50 SUCCESS in 2.423282ms
2017/12/14 13:34:50 SUCCESS in 2.43782ms
2017/12/14 13:34:50 SUCCESS in 2.362279ms

Keybase proof

I hereby claim:

  • I am tschuy on github.
  • I am tschuy (https://keybase.io/tschuy) on keybase.
  • I have a public key ASDijmTK_HZKHLg2YaWej7WyU_L6RrP6bxhoiDDAzbBO4wo

To claim this, I am signing this object:

mkdir ~/.bin
echo "export PATH=~/.bin:\$PATH" >> ~/.bash_profile
curl https://gist.githubusercontent.com/tschuy/d0a9a78ef19d9310d59d19e71fde8706/raw/9d5200e8c623892104bcd7c781aaa33caeecc5eb/cutter > ~/.bin/cutter
chmod +x ~/.bin/cutter
@tschuy
tschuy / cutter
Last active November 18, 2016 22:39
#!/bin/bash
# MIT License (c) 2016 tschuy
vid=$1
outputbase=$2
len=$3
increment=1
ext="${vid##*.}"

Class notes sharer

  • user authentication, user accounts
  • users belong universities and classes within those universities
  • classes belong to universities
    • ex: class(MTH254 Fall 2015, Dr. Who, 3pm) belongs to uni(OSU)

When a user belongs to a class they can upload notes.

@tschuy
tschuy / GSoC.md
Last active September 14, 2015 18:11
Google Summer of Code blog post

Google Summer of Code 2015: What's Fresh

This summer the Open Source Lab had three students from around the world working on open source software through Google Summer of Code. The OSL has participated in GSoC for nine years, and each year has had its own unique challenges and successes.

I had an opportunity to work with a student, Chaitanya, on What's Fresh, a project I originally developed last summer at the OSL for Oregon Sea Grant.

@tschuy
tschuy / get_repos.py
Created August 13, 2015 17:04
A quick script that shows you all of the repos where you've been involved with issues
import urllib, json, time
items = []
x = 0
while True:
x += 1
print x
url = "https://api.github.com/search/issues?q=involves:tschuy&sort=created&order=desc?client_id=xxx&client_secret=yyyy&page=" + str(x+1)
response = urllib.urlopen(url);
data = json.loads(response.read())
if data.get('message'):