Skip to content

Instantly share code, notes, and snippets.

View taichunmin's full-sized avatar

戴均民 taichunmin

View GitHub Profile
@taichunmin
taichunmin / taiwan_mobile_sms.class.php
Created July 3, 2014 13:49
大量寄送台灣大哥大簡訊的程式 2013.03.29
<?php
/*
@author taichunmin <taichunmin@gmail.com>
@program Send Taiwan Mobile SMS by https://messaging.taiwanmobile.com/
@version 2013.03.29 taichunmin
這個程式只是暫時寫到【能夠執行】的程度,錯誤處理還沒有處理得很好。
有些流程可能有些不順,等有動力再來更新吧。
*/
@header("Content-type:text/html; charset=utf-8");
date_default_timezone_set('Asia/Taipei');
@taichunmin
taichunmin / ConvertToUTF8.json
Created September 5, 2014 00:16
ConvertToUTF8.sublime-settings
{
// supported encoding list, name & code in pair
"encoding_list" : [
// ["Chinese Simplified (GBK)", "GBK"],
// ["Chinese Traditional (BIG5)", "BIG5"],
// ["Korean (EUC-KR)", "EUC-KR"],
// ["Japanese (CP932)", "CP932"],
// ["Japanese (Shift_JIS)", "Shift_JIS"],
// ["Japanese (EUC-JP)", "EUC-JP"],
// ["UTF-8", "UTF-8"]
@taichunmin
taichunmin / pageant_startup_add_ssh_key.bat
Created September 15, 2014 01:27
This script can auto load ssh key to putty's pageant program. OS: Windows. You should manually add this bat file to windows startup folder.
@echo off
timeout 3
start /b "" "D:\Program Files (x86)\putty\PAGEANT.exe" ssh-key-path1 [ssh-key-path2 ...]
@taichunmin
taichunmin / 20141127-bootstrap-quiz.md
Last active August 29, 2015 14:10
20141127-bootstrap-quiz.md

HTML Quiz

填表網址:http://goo.gl/forms/qaXu7OQmsl

Quiz #1

請問 BootstrapGrid System 把寬度分成多少等分?把螢幕寬度分成多少個等級?

  1. 分成 12 等分、分成 4 個等級。
  2. 分成 10 等分、分成 4 個等級。
@taichunmin
taichunmin / jquery-bookmark.md
Created November 28, 2014 03:27
jquery-bookmark tutorial

jQuery Bookmark

本教學的 jQuery 均為 1.11.1

動態讀取

將以下的程式碼新增為書籤

javascript:(function(i,s,o,g,a,m){a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js');
@taichunmin
taichunmin / BlackJack.md
Last active August 29, 2015 14:10
Black Jack

Blackjack

Blackjack 是個簡單而且熱門的卡牌遊戲,在很多賭場內都看的到它。在 Blackjack 內的撲克牌計分方式如下:

  • A 可以根據您的需求計算為 1 分或是 11
  • Face cards ( JQK ) 都是 10 分。
  • 其他的撲克牌就依照牌面上的點數計分

Blackjack 每一輪遊戲中,playerdealer 的目的是要取得最接近 21 點數的牌以贏得這輪遊戲,擁有最高點數的玩家獲勝,但超過 21 點而爆牌則會立即輸掉這輪遊戲。

Problem 3 (Python)

from sys import stdin
import collections

len1, len2 = [ int(_) for _ in stdin.readline().split(' ')]
len1 -= 1
<?php
class Progress_bar
{
private $max = 1;
private $cnt = 0;
private $molecular = 0; // 分子
private $ng; // 下一個目標
private $clear_line = " \r";
public $printFormat;
// http://game.ioxapp.com/color/
function fa($obj) {
$obj.click();
}
setInterval(function(){
var $target = [], bgcolor = [];
$("#box span").each(function(i){
switch($target.length) {
case 0: // 初始狀態