Skip to content

Instantly share code, notes, and snippets.

View seagoj's full-sized avatar

Jeremy Seago seagoj

View GitHub Profile
@seagoj
seagoj / git-hash
Created April 14, 2016 16:01
Get hash of current git commit
#!/bin/bash
git rev-parse HEAD
@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 / 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 / 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 / hooks-ctags
Created August 4, 2015 23:00
hook for generating ctags
#!/bin/sh
set -e
PATH="/usr/local/bin:$PATH"
dir="`git rev-parse --git-dir`"
trap 'rm -f "$dir/$$.tags"' EXIT
git ls-files | ctags --tag-relative -L - -f"$dir/$$.tags" --languages=php,-sql,-javascript
mv "$dir/$$.tags" "$dir/tags"
@seagoj
seagoj / keybase.md
Created April 14, 2015 16:54
keybase.md

Keybase proof

I hereby claim:

  • I am seagoj on github.
  • I am seagoj (https://keybase.io/seagoj) on keybase.
  • I have a public key whose fingerprint is E75E FB01 8FAC 9FE5 9ABE 4393 C7C0 9A06 189A 6BF6

To claim this, I am signing this object:

@seagoj
seagoj / canada.html
Last active August 29, 2015 14:17
Canada
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>amMap example</title>
<link rel="stylesheet" href="../ammap/ammap.css" type="text/css">
<script src="../ammap/ammap.js" type="text/javascript"></script>
<script src='https://code.jquery.com/jquery-2.1.3.min.js'></script>
@seagoj
seagoj / Option1.htm
Created March 28, 2015 16:25
Flash Video
<!--// Try this one first //-->
<object type="application/x-shockwave-flash" data="http://45.55.147.76/flash.swf"
width='550'
height='300'
>
<param name="movie" value="http://45.55.147.76/flash.swf" />
<param name="quality" value="high" />
</object>
@seagoj
seagoj / object.js
Created January 29, 2015 22:11
Testing event handlers
module.exports = (function() {
var bindUI = function() {
$(element).click(doThatThing);
};
var doThatThing = function() {
return 'that thing';
};
return {
@seagoj
seagoj / object.js
Created January 28, 2015 21:22
set property via ajax
var object = (function() {
var property;
var init = function() {
$.ajax({
url: '/get/property',
data: {'get': 'property'},
success: function(data) {
property = data.property;
}