Skip to content

Instantly share code, notes, and snippets.

View tedshd's full-sized avatar

Ted tedshd

View GitHub Profile
@tedshd
tedshd / httpd.conf
Created December 17, 2014 06:57
apache config
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# General configuration.
# $ tmux show-options -g
set -g base-index 1
set -g display-time 5000
set -g repeat-time 1000
set -g status-keys vi
set -g status-utf8 on
set -g status-bg black
set -g status-fg white
set -g status-justify left
[
{
"keys": ["ctrl+w"],
"command": "run_multiple",
"args": {
"commands": [
{"command": "find_under_expand", "args": null, "context": "window"},
{"command": "show_panel", "args": {"panel": "find"}, "context": "window"}
]
}
@tedshd
tedshd / vimrc_by_mba
Created January 30, 2014 05:15
vimrc
filetype on
if &diff
filetype plugin off
else
filetype plugin on
endif
set bs=2
set cindent
set history=50
@tedshd
tedshd / escape.js
Created September 12, 2013 01:39
escape
util.htmlspecialchars = function (str) {
return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
};
util.htmlspecialchars_decode = function (str) {
return str.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"");
};
util.nl2br = function (str) {
return str.replace(/\n/g, "<br>");
};
@tedshd
tedshd / upload_note.md
Created August 2, 2013 04:54
upload file note

fileUpload by yui library

init upload button

JavaScript bind click event

in IE

use JavaScript move CSS position

  • uploader : Upload file
@tedshd
tedshd / amChats_usage.js
Created July 17, 2013 03:54
amCharts usage
amCharts
// 建立取資料的物件
var chart = new AmCharts.AmSerialChart();
chart.dataProvider = chartData;
// 圓餅圖
var chart = new AmCharts.AmPieChart();
chart.dataProvider = chartData;
@tedshd
tedshd / img_width&height.html
Created June 19, 2013 02:04
bootstrap media object test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet">
<title>Img_width&height</title>
<style>
img {
width: 200px; !important;
@tedshd
tedshd / Build_gh-pages.sh
Last active December 18, 2015 12:59
build gh-pages flow
tedshd@Tedshd-mba [12:28:50] [~/Develop/keyboard_test_page] [master]
-> % git checkout --orphan gh-pages
Switched to a new branch 'gh-pages'
tedshd@Tedshd-mba [12:29:22] [~/Develop/keyboard_test_page] [gh-pages *]
-> % git st
# On branch gh-pages
#
# Initial commit
#
# Changes to be committed:
@tedshd
tedshd / messages.js
Created June 6, 2013 02:06
yui uploader from hunter
/**
* Spec : http://produce.corp.miiicasa.com/spec/miiiCloud_V2/?Page=Page_1-3_p_message_board_attach_files_done1
* Mockup : http://produce.corp.miiicasa.com/ued/visual_center/mockup/miiicloud_v2/page_1_3_p_message_board_attach_files_done1.png
*
* @authors Ted Shiu
* @date 2013-06-10 16:32:25
*
*/
$(function () {