Skip to content

Instantly share code, notes, and snippets.

View thenormalsquid's full-sized avatar
I'm your huckleberry

Thien-Bach Huynh thenormalsquid

I'm your huckleberry
View GitHub Profile
@thenormalsquid
thenormalsquid / asset loading
Created December 19, 2014 21:13
asset loading
Loader=function()//asset-loading system
{
this.loadingN=0;
this.assetsN=0;
this.assets=[];
this.assetsLoading=[];
this.assetsLoaded=[];
this.domain='';
this.loaded=0;//callback
@thenormalsquid
thenormalsquid / blackdeck
Created December 18, 2014 14:47
blackdeck
var arr = [1,2,3,4,5,6,7,8,9,10]
function binarySearch(elem, arr) {
//loop through array and partition
var max = arr.length - 1,
min = 0,
mid = arr[Math.floor(len/2)];
if (arr.length === 0){
return "Key not found, array is empty";
function isFib(val) {
var check1 = 5 * Math.pow(val, 2) + 4;
var check2 = 5 * Math.pow(val, 2) - 4;
function isPerfectSquare(num) {
return Math.sqrt(num) % 1 === 0;
}
//we see if the checks are perfect squares
var isPerfect1 = isPerfectSquare(check1);
import unittest
from ps5 import *
score = 0.0
potential_score = 0.0
def add_potential_points(points):
global potential_score
potential_score += points
def add_points(points):
import feedparser
import string
import time
from project_util import translate_html
from news_gui import Popup
#-----------------------------------------------------------------------
#
def process(url):
<BasketCase> if not that might speed it up
<BasketCase> as well as enabling a pass-phrase in a convenient way
<trbotime> oh wow, thanks! i'll let him know
<BasketCase> pageant can be run with the key file on the command line. if the key is pass-phrased there will be a prompt for that
<BasketCase> then all putty programs (and clonezilla) can authenticate from pageant instead of the file
<BasketCase> like ssh-agent but Windows
<trbotime> i didn't know about pageant either, I'm reading some resources on it now...this is really helpful
<trbotime> thank you so much
<BasketCase> ssh under cygwin can authenticate against it too with a replaced ssh-agent
@thenormalsquid
thenormalsquid / event-post-type.php
Created January 15, 2012 21:14
event-post-type.php goes in /event-post-type
<?php
/*
Plugin Name: Event Post Type
Plugin URI:
Description: Event Post Type brings events to WordPress in a simple intuitive style.
Author: Joel Bergroth
Version: 1.0.2
Author URI: http://edvindev.wordpress.com
*/