Skip to content

Instantly share code, notes, and snippets.

View rve's full-sized avatar
🎯
Focusing

Askesis rve

🎯
Focusing
View GitHub Profile
@rve
rve / hello.c
Created July 1, 2012 11:25
helloworld test
#include<stdio.h>
int main()
{
printf("hello_world");
}
a = 'foo'
class << a
def inspect
'"bar"'
end
end
a.inspect # => "bar"
a = 'foo' # new object, new singleton class
a.inspect # => "foo"
gem 'faye'
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.5)
Using builder (3.0.0)
Using activemodel (3.2.5)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
gem 'faye'
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.5)
Using builder (3.0.0)
Using activemodel (3.2.5)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
@rve
rve / gist:5024269
Created February 24, 2013 15:43
Rubik cube
U' F L' U' L' B2 F D2 L R' D R F2 R U R' D F2 L F2 R D' U' R' L2
@rve
rve / gist:5026374
Created February 25, 2013 00:10
kimbits half
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string>
#define MAXN 33
#define INF 0x3f3f3f3f
using namespace std;
int size[MAXN][MAXN];
string ans;
@rve
rve / gist:5027890
Created February 25, 2013 05:11
class schedule
<html version="g42dymwpi--nx"><script type="text/javascript">window["_gaUserPrefs"] = { ioo : function() { return true; } }</script><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生课表</title>
<style>
#subprinttable1{
border: 1px solid #d3dffa;
border-collapse: collapse;
font-size:12px;
}
@rve
rve / gist:5055619
Created February 28, 2013 10:00
asm class snap
org 7c00h ; 告诉编译器程序加载到7C00H处
mov ax,cs
mov ds,ax
mov es,ax
call DispStr
Jmp $ ; 无限循环
DispStr: ; 显示字符串例程
;clear screen
mov al,0
mov cx,0
@rve
rve / gist:5061522
Created March 1, 2013 00:47
cf_170_div2_2
#include<iostream>
#include<cstdlib>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<string>
#include<set>
#define MAXN 21
#define INF 0x3f3f3f3f
using namespace std;
@rve
rve / gist:5090657
Created March 5, 2013 14:27
winsock demo TCPServer
#include <winsock2.h>
#include <time.h>
#include "conio.h"
#define QLEN 5
#define WSVERS MAKEWORD(2, 0)
#pragma comment(lib, "ws2_32_lib")
int main(int argc, char argv[])