Skip to content

Instantly share code, notes, and snippets.

View seagoj's full-sized avatar

Jeremy Seago seagoj

View GitHub Profile
@seagoj
seagoj / mario-modular.c
Last active August 26, 2015 20:32
cs50 mario solution
#include <stdio.h>
#include <cs50.h>
int getHeightFromUser()
{
int height;
do {
printf("height: ");
height = GetInt();
@seagoj
seagoj / test50
Created August 27, 2015 16:01
Test runner for the CS50 course
#!/bin/sh
ps=${PWD##*/}
style50 $1.c
clang -o $1 $1.c -lcs50 $2
check50 2014.fall.$ps.$1 $1.c
@seagoj
seagoj / gulpfile.js
Created March 14, 2016 18:27
sass-es2015-gulpfile
var babelify = require('babelify');
var browserify = require('browserify');
var fs = require('fs');
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var paths = {
scripts: {
root: './resources/js/modules/index.js',
destDir: './public/dist/js',
@seagoj
seagoj / git-hash
Created April 14, 2016 16:01
Get hash of current git commit
#!/bin/bash
git rev-parse HEAD
@seagoj
seagoj / vagrant-up
Created April 14, 2016 16:03
Resume/Suspend Vagrant VM script
# !/bin/bash
(\
# attempts to resume VM
(vagrant resume; vagrant ssh) || \
# rebuilds vm
(vagrant destroy -f &amp;&amp; vagrant up; vagrant ssh)\
# suspends when ssh session closes
) && vagrant suspend
function isEmpty(obj) {
for(var key in obj) {
if(obj.hasOwnProperty(key))
return false;
}
return true;
}
@seagoj
seagoj / mac_apps.markdown
Last active January 5, 2017 17:10
mac gui apps
@seagoj
seagoj / request.py
Created March 19, 2017 22:15
request example
#!/usr/bin/env python3
import requests
r = requests.get('http://ip.jsontest.com/');
print(r.json());
@seagoj
seagoj / Alacritty.md
Created January 24, 2019 20:10
Storm King's Thunder:Alacritty
  • Level: 6
  • Experience: 15685 + 650 / 23000
  • HP: 40/40
  • Init: 3
  • AC: 13
  • Speed: 30
  • Proficiency Bonus: 3

Stats

  • Str: 8 (-1)
@seagoj
seagoj / vim-vixen.json
Created October 15, 2019 13:08
Vim Vixen
{
"keymaps": {
"0": { "type": "scroll.home" },
":": { "type": "command.show" },
"o": { "type": "command.show.open", "alter": false },
"O": { "type": "command.show.open", "alter": true },
"t": { "type": "command.show.tabopen", "alter": false },
"T": { "type": "command.show.tabopen", "alter": true },
"w": { "type": "command.show.winopen", "alter": false },
"W": { "type": "command.show.winopen", "alter": true },