Skip to content

Instantly share code, notes, and snippets.

View codecat's full-sized avatar
🌸
Meow

Melissa codecat

🌸
Meow
View GitHub Profile
@codecat
codecat / vm.cpp
Last active April 16, 2017 12:15
16 bit bytecode VM
//
// This is an incomplete VM that runs 16 bit bytecode written in C++.
// It's very basic and probably lacks a lot, so this is not to be used in production at all.
// It was however fun to write, so I provide this as a Gist.
//
// https://github.com/codecat
//
#include <cstdio>
#include <cstdint>
@codecat
codecat / imgur-uploader
Created July 4, 2012 22:23 — forked from robertbasic/imgur-uploader
xfce4-screenshooter to imgur
#!/bin/bash
# Ubuntu Keyboard settings shortcut:
# xfce4-screenshooter -r -o "sh /location/to/imgur-uploader.sh"
API_KEY=YOUR_API_KEY_GOES_HERE
URL=http://api.imgur.com/2/upload
RESPONSE=$(curl -s -F "key=$API_KEY" -F "image=@$1" $URL)
echo "$RESPONSE" | grep -o -E "<original>.*</original>" | grep -o -E "http://.*\.png" | xsel -i -b