Skip to content

Instantly share code, notes, and snippets.

View itszero's full-sized avatar

Zero Cho itszero

View GitHub Profile
#include <cstdio>
#include <cstdlib>
using namespace std;
char* md5(char* str)
{
char cmd[500];
sprintf(cmd, "echo -n \"%s\" | md5sum", str);
FILE *fd = popen(cmd, "r");
char *hash = (char*)malloc(sizeof(char) * 33);
Client 連線到 Server 後送出
Client => LOGIN [使用者名稱] [MD5編碼密碼](換行)
Server 收到後如果正確就會回傳
Server => LOGIN OK(換行)
如果失敗則回應
Server => LOGIN FAIL(換行)
範例:
Client => LOGIN itsZero 68e109f0f40ca72a15e05cc22786f8e6
Server => LOGIN OK
<!DOCTYPE html>
<html>
<head>
<title>eecesnmg - Wireless Guests Mangements</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="/main.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="/print.css" media="print" rel="stylesheet" type="text/css"/>
<script src="/jquery.js" type="text/javascript"></script>
<script src="/jquery.editinplace.js" type="text/javascript"></script>
</head>
#!/usr/bin/ruby
dir = ARGV[0]
Dir.glob("#{dir}/*.zip").each do |f|
basename = File.basename(f, ".zip")
system "mkdir #{dir}/#{basename}"
system "unzip #{f} -d #{dir}/#{basename}"
arr = Dir.glob("#{dir}/#{basename}/*")
@itszero
itszero / VMPASyncCallbackListener.java
Created July 28, 2009 02:41
VMPServer 的參考原始碼
package tw.mpclab.VMP.Server;
import org.json.JSONObject;
public abstract class VMPASyncCallbackListener {
public abstract void onCallback(JSONObject obj);
public void onFinish() {
}
}
zeros-macbook-pro-2:ZRChromaHash Zero$ ls -R .
Debug ZRChromaHashColorAnimation.j
Info.plist ZRChromaHashTextField.j
Rakefile ZRChromaHashView.j
Release licenses
ZRChromaHash
./Debug:
ZRChromaHash
We couldn’t find that file to show.
We couldn’t find that file to show.
#include<iostream>
using namespace std;
void fun(int *array)
{
cout << *array << endl;
}
int main()
{
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 0fda6e1..8a0f8d3 100644
@@ -545,11 +563,12 @@ static struct platform_device leds_gpio = {
static struct gpio_keys_button gpio_buttons[] = {
{
- .code = BTN_EXTRA,
- .gpio = 7,
+ .code = 158,
+ .gpio = 26,