Skip to content

Instantly share code, notes, and snippets.

View yuxhuang's full-sized avatar

Stochastic Dev yuxhuang

View GitHub Profile
{"sig":"a72f9d45611f1c13d6484d2887eeb95ab199962c842346b3ed04f3b78308ddda21f3bba9d75b06757a9534f9fb3f45adba3ad49cf5d7d4a0dc29548480e7d4360","msghash":"abc7c7dd6f988113524b5163423d500c3285163c398a5c2fd722231729922763"}
0xb52B109Eb66b9Cee8aFB3Fc2eb91b8fF3aaB72a4
@yuxhuang
yuxhuang / hiplar.sh
Created September 28, 2016 06:30
Bash script to build HiPLARM for R.
#!/bin/bash
mkdir LALibs
export BLDDIR=/home/felix/src/LALibs
cd $BLDDIR
mkdir lib
mkdir include
LIBDIR=$BLDDIR/lib
INCDIR=$BLDDIR/include
NUM_PHYS_CPU=`cat /proc/cpuinfo | grep 'physical id' | sort | uniq | wc -l`

Keybase proof

I hereby claim:

  • I am yuxhuang on github.
  • I am yuxhuang (https://keybase.io/yuxhuang) on keybase.
  • I have a public key whose fingerprint is 664D CF8A 6AB2 9B11 D8F4 9663 88F7 D864 E224 BB40

To claim this, I am signing this object:

# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
-- set your current connection to use master otherwise you might get an error
use master
ALTER DATABASE YourDatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE
--do you stuff here
ALTER DATABASE YourDatabase SET MULTI_USER
@yuxhuang
yuxhuang / placeholder.js
Created May 8, 2013 16:13
placeholder.js
if (Modernizr && !Modernizr.input['placeholder']) {
$('[placeholder]:not(.placeholder_processed)').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
@yuxhuang
yuxhuang / gist:371701
Created April 19, 2010 21:57
infinitescroll
/*!
// Infinite Scroll jQuery plugin
// copyright Paul Irish, licensed GPL & MIT
// version 1.4.100211
//
// changelog:
// * added post support
//
// home and docs: http://www.infinite-scroll.com
*/
From 4a050b1687f645b0e9eb9510e382639dbfd7167b Mon Sep 17 00:00:00 2001
From: Felix Huang <gzfelix@gmail.com>
Date: Tue, 17 Feb 2009 14:44:04 -0400
Subject: [PATCH] * fix overhead monitor memory usage problem
* awards to feedapi change to new schema
---
campus/js/overhead_monitor_cem_receiver.js | 2 +-
campus/js/overhead_monitor_cem_receiver.jsrc | 14 ++++++++++----
xml/awards-to-feedapi.xsl | 6 +++++-