Skip to content

Instantly share code, notes, and snippets.

View henteko's full-sized avatar
😻
💯💯💯💯💯💯💯💯

henteko henteko

😻
💯💯💯💯💯💯💯💯
View GitHub Profile
@henteko
henteko / algorithm1.c
Created November 10, 2012 08:30
report
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define BUFLEN 80
#define STKLMT 100
char STACK[STKLMT];
int StkCtr;
@henteko
henteko / unsetup_proxy4UEC.sh
Created October 26, 2012 18:13
proxy unsetup sh
#!/bin/sh
networksetup -setwebproxystate Wi-Fi off
networksetup -setsecurewebproxystate Wi-Fi off
@henteko
henteko / setup_proxy4UEC.sh
Created October 26, 2012 18:12
proxy setup sh
#!/bin/sh
PROXY="proxy url"
PORT=port_num
networksetup -setwebproxy Wi-Fi ${PROXY} ${PORT}
networksetup -setsecurewebproxy Wi-Fi ${PROXY} ${PORT}
@henteko
henteko / index.php
Created October 16, 2012 06:33
iframe内からリダイレクト
<?php
$uri = "https://www.facebook.com/hoge/app_hgoehoge";
print "<script type='text/javascript'>top.location.href='" . $uri . "';</script>";
exit;
?>
@henteko
henteko / 20121003.cpp
Created October 3, 2012 10:17
Project Euler #73
#include<iostream>
using namespace std;
int gcd(int a,int b) {
if(a == b) return a;
if(a < b) return gcd(a,b-a);
if(a > b) return gcd(a-b,b);
}
@henteko
henteko / gist:2937402
Created June 15, 2012 16:24
henteko code
bool num_check(char c) {
return c >= 48 && c <= 57;
}
@henteko
henteko / Ti.UI.ImageView#imageWithCache
Created September 29, 2011 07:37 — forked from func09/Ti.UI.ImageView#imageWithCache
TitaniumのImageViewでリモートURLの画像を永続的にキャッシュする
$$$ = {};
$$$.ui = {};
$$$.ui.createImageView = function(options){
var ui = Ti.UI.createImageView(options);
// 画像を永続化してキャッシュ
ui.imageWithCache = function(url){
url = url.replace(/\?[0-9]+$/,'');