Skip to content

Instantly share code, notes, and snippets.

@pathawks
pathawks / slide.js
Created March 17, 2014 13:51
GPU Accelerated Slides in jQuery
jQuery.fn['slideToggle'] = function( speed, easing, callback ) {
if (jQuery(this).height()) {
jQuery(this).css('transition', 'all .3s').css('overflow','hidden').css('height','0');
} else {
jQuery(this).css('transition', 'all .3s').css('overflow','hidden').css('height',jQuery(this).prop('scrollHeight')+'px');
}
};
jQuery.fn['slideUp'] = function( speed, easing, callback ) {
jQuery(this).css('transition', 'all .3s').css('overflow','hidden').css('height','0');
; no-ion.inc
; Renames common Ion calls to the MirageOS equivilant
_cleargbuf = _GrBufClr
graph_mem = gbuf
progstart = 9D95h
ionRandom = irandom
ionPutSprite = isprite
ionLargeSprite = ilsprite
@pathawks
pathawks / keybase.md
Last active August 29, 2015 14:07
Keybase Proof

Keybase proof

I hereby claim:

  • I am pathawks on github.
  • I am pathawks (https://keybase.io/pathawks) on keybase.
  • I have a public key whose fingerprint is D97C 9D17 D3D7 6B6F 3255 5A6B F174 6FF5 F18B 3D1B

To claim this, I am signing this object:

@pathawks
pathawks / gitio
Last active August 29, 2015 14:09
Git.io Short URLs from Command Line
#!/bin/sh
if [ "$#" -eq 2 ]; then
curl -i http://git.io -F "url=$1" -F "code=$2" 2>/dev/null | grep 'Location' | sed 's/.*: //'
elif [ "$#" -eq 1 ]; then
curl -i http://git.io -F "url=$1" 2>/dev/null | grep 'Location' | sed 's/.*: //'
else
echo "Syntax error"
fi
@pathawks
pathawks / GCC Options-en.md
Last active August 29, 2015 14:15
Common GCC Options
Option Explanation
-o <OutputFile> Specify name of output file
-Wall Shows all warning messages
-Wextra Shows even more warning messages
-g Include debug information in output (For debugging with gdb)
-gstabs Include debug information in output (-g is preferred)
-c Do not link; output object file (Does not produce .exe)
-S Do not assemble; output assembler code.
-O0 Do not optimize output (Useful for debugging)
@pathawks
pathawks / CHALLEN1.BAS
Last active August 29, 2015 14:15
Programming Challenge 1
REM To run:
REM 1. Get a time machine
REM 2. Travel back to the early 90s
REM 3. In MS-DOS 5+, run `qbasic /run CHALLEN1.BAS`
10 PRINT "Enter a whole number between 1000 and 999999 without spaces or commas."
20 INPUT "", N&
30 IF N& < 1000 OR N& > 999999 THEN GOTO 10
40 PRINT LTRIM$(STR$(INT(N& / 1000)));
50 PRINT ",";
@pathawks
pathawks / Test.cpp
Last active August 29, 2015 14:16
Test Framework
/**
* @author: Pat Hawks
* Created on: Feb 26, 2015
* Source File: Test.cpp
*/
#include <iomanip>
#include <iostream>
#include <string>
using namespace std;
@pathawks
pathawks / Challenge2.S
Last active August 29, 2015 14:16
Challenge 2
/**
* @author: Pat Hawks
* Created on: Mar 06, 2015
* Source File: Challenge2.s
*
* To compile:
* gcc Challenge2.s -o Challenge2
*/
.code32
@pathawks
pathawks / README.md
Created November 5, 2011 20:58
Simple Jekyll feed

Jekyll Feed

A safe way to add an Atom feed to a Jekyll site

In _config.yml you should define the following

  • url
  • title
  • owner
  • owner_email
@pathawks
pathawks / Jekyll sitemap.md
Last active September 27, 2015 22:28 — forked from metaskills/jekyll_sitemap.markdown
Jekyll sitemap.xml

Jekyll Sitemap

The best way to add a sitemap to a Jekyll site is with the jekyll-sitemap plugin.

In your _config.yml

gems:
- jekyll-sitemap