Skip to content

Instantly share code, notes, and snippets.

View wotupset's full-sized avatar
⚜️
太平島挖石油

断固非難 wotupset

⚜️
太平島挖石油
  • 仗劍紅塵已是癲,有酒平步上青天;遊星戲鬥弄日月,醉臥雲端笑人間。
View GitHub Profile
wwwwwwwwwwww
dddddddddd
https://gist.github.com
@wotupset
wotupset / gist:5853267
Created June 24, 2013 20:20
aotohotkey test
#x::
MouseMove, 355,285
Click
Sleep 500
Loop,5 ;三格來回走 人物一開始需站在純點
{
Random, rand, 0,10
Random, rand2, 0,1
var := % rand2 ? -1 : 1
tmpx:= % 260 + rand*var
If you need immediate assistance, post a report including this crash log to http://www.xsplit.com/forum or contact XSplit Support Team at support@xsplit.com.
The following information about the error was automatically captured:
• an event was written to the application log
Detailed error information follows:
Date and Time: 2013/6/25 上午 09:25:24 +08:00
@wotupset
wotupset / eval_gzencode_base64_encode_.php
Last active December 28, 2015 17:09
131119 讀寫檔案練習
<?php
/*
http://www.php.net/manual/de/function.eval.php#59862
压缩函数:gzcompress gzdeflate /gzencode(not always installed)
解压函数:gzuncompress gzinflate /gzdecode(not always installed)
base64_encode <=> base64_decode
htmlspecialchars
*/
//*****************
@wotupset
wotupset / pic/index.php
Last active December 28, 2015 20:59
pic/index.php
<?php
//*****************
header('Content-type: text/html; charset=utf-8');
extract($_POST,EXTR_SKIP);
$phpself=basename($_SERVER["SCRIPT_FILENAME"]);//被執行的文件檔名
date_default_timezone_set("Asia/Taipei");//時區設定
$time = time();//UNIX時間時區設定
$query_string=$_SERVER['QUERY_STRING'];
//$query_string=$GLOBALS['query_string'];
@wotupset
wotupset / 131122/array_unshift.php
Created November 22, 2013 04:48
array_unshift.php
<?php
header('Content-type: text/html; charset=utf-8');
date_default_timezone_set("Asia/Taipei");//時區設定
$time = time();//UNIX時間時區設定
$date=gmdate("ymd",$time);
$tmp_f_cnt_arr=array("aaa","bb","ddddddd");
//$a=array("a"=>"Cat","b"=>"Dog");
$arr_2="$date,1";//新的紀錄 從1開始
array_unshift($tmp_f_cnt_arr,$arr_2);//擺回去
echo "<pre>";
@wotupset
wotupset / 131122.php
Created November 22, 2013 08:01
php header 常見類型整理
<?php
$mimetypes = array(
'ez' => 'application/andrew-inset',
'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'doc' => 'application/msword',
'bin' => 'application/octet-stream',
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
@wotupset
wotupset / txt
Created November 22, 2013 16:25
國別代號
029: en-029: Caribbean (Caribbean)
AE: ar-AE: U.A.E. (الإمارات العربية المتحدة)
AF: ps-AF: Afghanistan (افغانستان)
AF: prs-AF: Afghanistan (افغانستان)
AL: sq-AL: Albania (Shqipëria)
AM: hy-AM: Armenia (Հայաստան)
AR: es-AR: Argentina (Argentina)
AT: de-AT: Austria (Österreich)
AU: en-AU: Australia (Australia)
AZ: az-Latn-AZ: Azerbaijan (Azərbaycan)
@wotupset
wotupset / gist:7655679
Created November 26, 2013 09:33
刪掉三字元文字
<?php
header("content-Type: text/html; charset=utf-8"); //語言強制
$str="asd中文ㄍㄍㄍ";
$len = strlen($str);
$cc=0;
for($i = 0; $i < $len; $i++){
$char = substr($str, $i, 1); //函数返回字符串的一部分
if(ord($char) > 127){//非字母
$arr[$cc][0] = substr($str, $i, 3); //前3字元 函数返回字符串的一部分
$arr[$cc][1] = "3";
<?xml version='1.0' encoding='utf-16'?>
<config module='ClientConfiguration' version='4.9'>
<option name='light-shaft' value='0'/>
<option name='ao' value='0'/>
<option name='motion-blur' value='0'/>
<option name='dof' value='1'/>
<option name='dynamic-shadow' value='0'/>
<option name='other-physics' value='0'/>
<option name='foliage' value='0'/>
<option name='texture-level' value='2'/>