Skip to content

Instantly share code, notes, and snippets.

ipcs -a | grep 0x | awk '{printf( "-Q %s ", $1 )}' | xargs ipcrm
@freetstar
freetstar / navigation.js
Created August 18, 2012 15:24 — forked from pala/navigation.js
jquery keyboard navigation
$(function(){
$(document).keydown(function(e) {
var url = false;
if (e.which == 37 || e.which == 74) { // Left arrow and J
{% if page.previous %}
url = '{{page.previous.url}}';
{% endif %}
}
else if (e.which == 39 || e.which == 75) { // Right arrow and K
{% if page.next %}
@freetstar
freetstar / navigation.js
Created August 18, 2012 15:21 — forked from pala/navigation.js
jquery keyboard navigation
$(function(){
$(document).keydown(function(e) {
var url = false;
if (e.which == 37 || e.which == 74) { // Left arrow and J
{% if page.previous %}
url = '{{page.previous.url}}';
{% endif %}
}
else if (e.which == 39 || e.which == 75) { // Right arrow and K
{% if page.next %}
@freetstar
freetstar / gist:2939585
Created June 16, 2012 01:50 — forked from fxsjy/gist:2928683
bpnn solve kindergarten problem
# Back-Propagation Neural Networks
# another way: solve it as a Regression Problem
# Written in Python. See http://www.python.org/
# Modified by JSun to solve the problem here: http://www.weibo.com/1497035431/ynPEvC78V
# Neil Schemenauer <[email protected]>
import math
import random
import string
@freetstar
freetstar / ai-class.py
Created November 13, 2011 05:01 — forked from vickychijwani/ai-class.py
Download lecture videos of ai-class, with HTTP proxy and basic resume support
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Deepak.G.R."
__credits__ = "Sumod Hajela"
__license__ = 'Public Domain'
"""
usage:
Go to command line and type
@freetstar
freetstar / ai-class.py
Created November 12, 2011 13:17 — forked from vickychijwani/ai-class.py
Download lecture videos of ai-class, with HTTP proxy and basic resume support
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Deepak.G.R."
__credits__ = "Sumod Hajela"
__license__ = 'Public Domain'
"""
usage:
Go to command line and type