View title.bashrc
function title() {
echo -n -e "\033]0;$1\007"
}
View upload.go
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
View webstac_login.py
import mechanize
import getpass
# Get through the "Log in" button
br = mechanize.Browser()
br.open("https://acadinfo.wustl.edu/WebSTAC_init.asp")
br.select_form(name="form0")
br.submit()
# Get past the onload redirect page
View preserver
#! /usr/bin/env python
# LifePreserver - Time limiting script for Minecraft servers
import sys
from subprocess import Popen, PIPE
from collections import Counter
from datetime import datetime
from pytz import timezone
from time import sleep
START_HOUR = 9
View connect_image_upload.php
<?php
function uploadItemImage($url, $access_token, $image_file) {
$headers = ["Authorization: Bearer $access_token"];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['image_data' => "@$image_file;type=image/jpeg"]);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
View uploader.cs
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.IO;
using System;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
static class ImageUploader
{
View gist:58bd5c1f86a27b212811
#! /bin/bash
# Brainfuck - Troy Deck
#############
# Constants #
#############
CELLS=500
###########
# Globals #