Skip to content

Instantly share code, notes, and snippets.

View idealhack's full-sized avatar
💭
I may be slow to respond.

Y idealhack

💭
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am idealhack on github.
  • I am idealhack (https://keybase.io/idealhack) on keybase.
  • I have a public key whose fingerprint is 867A BBA5 F425 0A0E C82F 0F14 0A21 4100 C4E1 11D0

To claim this, I am signing this object:

/*jslint undef: true, nomen: true, eqeqeq: true, plusplus: true, newcap: true, immed: true, browser: true, devel: true, passfail: false */
/*global window: false, readConvertLinksToFootnotes: false, readStyle: false, readSize: false, readMargin: false, Typekit: false, ActiveXObject: false */
var dbg = (typeof console !== 'undefined') ? function(s) {
console.log("Readability: " + s);
} : function() {};
/*
* Readability. An Arc90 Lab Experiment.
* Website: http://lab.arc90.com/experiments/readability
@idealhack
idealhack / static_server.js
Created May 6, 2012 14:13 — forked from respectTheCode/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require('http'),
url = require('url'),
path = require('path'),
fs = require('fs'),
mime = require('mime'),
port = process.argv[2] || 8888;
http.createServer(function(req, res) {
var uri = url.parse(req.url).pathname,
application: opm-mirror
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: main.py
@idealhack
idealhack / factorial.cs
Created May 13, 2013 10:15
Use recursion to achieve factorial calculation (20090120)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Factorial
{
class Program
{
public long Factorial(int n)
@idealhack
idealhack / fibonacci.cs
Created May 13, 2013 10:16
Use recursion to achieve Fibonacci numbers (20090121)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Fibonacci
{
class Program
{
public long Fibonacci(int n)

Games to play

Games to play

Play at least 20 of the following games. Write a 50 words review per game in English. After semester start we you will be asked to upload the review s on a discussion board on Blackboard.

  1. Morphopolis (PC) http://store.steampowered.com/app/314020 Point and click puzzle with very nice artwork.
  2. Rymdkapsel (iOS, Android, PC) http://rymdkapsel.com/ Strategy
  3. Secrets of mana (iOS , Android) https://itunes.apple.com/us/app/secret-of-mana/id407949800?mt=8 Classic RPG on tablet
  4. Hitman GO (iOS, Android, WP) https://itunes.apple.com/us/app/hitman-go/id731645633?mt=8 Board game style gameplay
@idealhack
idealhack / png.js
Created January 31, 2015 14:23
Read and Write PNG in Binary
// PNG 格式定义
// http://dev.gameres.com/Program/Visual/Other/PNGFormat.htm
var fs = require('fs');
// 测试文件
var FILE_IN = 'in.png'
, FILE_OUT = 'out.png';
var out = '';
@idealhack
idealhack / inline-css.js
Last active December 14, 2017 03:31
Inline CSS Maker Using Juice
#!/usr/bin/env node
var juice = require('juice')
, fs = require('fs')
var read = function (file) {
return fs.readFileSync(file, 'utf8')
}
var compile = function (template) {
@idealhack
idealhack / kue-reset.js
Last active December 14, 2017 03:33
Reset active kue jobs to inactive state
var redis = require ('redis'),
kue = require ('kue'),
redisClient = redis.createClient(6379, "127.0.0.1");
kue.redis.createClient = function () {
return redisClient;
};
kue.app.listen(7000);