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 / 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
*/
<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
import feedparser
import string
import time
from project_util import translate_html
from news_gui import Popup
#-----------------------------------------------------------------------
#
def process(url):
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):
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);
@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";
@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 / t1
Created January 5, 2015 05:06
tess
//
// FirstViewController.m
// Matchmaker
//
// Created by radicalcakes on 1/2/15.
// Copyright (c) 2015 matchmaker. All rights reserved.
//
#import "FirstViewController.h"
#import "ParseImageController.h"
Single-input UT EN1210: battery=ok, firstHopId=2491058177, hopCount=1, changed=NO, tamper=NO, reset=NO, trigger1=NO, trigger2=NO, trigger3=NO, trigger4=NO, status0=0x10, status1=0x0, rawMsg={72 12 B2 88 3A 6C 01 88 7A 94 00 01 3E 00 00 10 00 00 4A}
Single-input UT EN1210: battery=ok, firstHopId=2725939201, hopCount=1, changed=NO, tamper=NO, reset=NO, trigger1=NO, trigger2=NO, trigger3=NO, trigger4=NO, status0=0x10, status1=0x0, rawMsg={72 12 B2 88 3A 6C 01 88 7A A2 00 01 3E 00 00 10 12 12 7C}
__author__ = 'radicalcakes'
import TCPHandler
test_json_obj = {
#hidden server sould do the conversion of originators and firstHopid
"originator": 2995272300,
"firstHop": 25721492,
"traceCount": 00,
"hopCount": 01,
"pti": 00,