Skip to content

Instantly share code, notes, and snippets.

View LoadLow's full-sized avatar
🎯
Focusing

Load. LoadLow

🎯
Focusing
View GitHub Profile
#!/bin/sh
rpm -Uih https://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
curl -L https://get.rvm.io | bash -s stable
rvm install 2.0.0
rvm use 2.0.0@global --default
# for chinese user, if you have a wonderful speed ignore this part
# to have a faster download speed
# switch gem source to ruby.taobao.org
if (!rset.last()) {
return new int[0];
}
int[] ids = new int[rset.getRow()+1];
rset.beforeFirst();
for (int i = 0; i < ids.length; i++) {
rset.next();
ids[i] = rset.getInt(1);
}
@LoadLow
LoadLow / kbhit.c
Last active August 29, 2015 14:11 — forked from vsajip/kbhit.c
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
int kbhit(void)
{
struct termios oldt, newt;
int ch;
int oldf;