Skip to content

Instantly share code, notes, and snippets.

View ShinyChang's full-sized avatar
🏠
Working from home

Shiny ShinyChang

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Coursera clone" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Coursera clone" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/2.3.2/assets/js/bootstrap.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
@ShinyChang
ShinyChang / epiceditor.js
Created July 11, 2014 08:14
An advance EpicEditor
/**
* Shiny modified this file.
* Change Log:
* 1. Support TAB indent/outdent
* 2. Remote marked from this file
*
* EpicEditor - An Embeddable JavaScript Markdown Editor (https://github.com/OscarGodson/EpicEditor)
* Copyright (c) 2011-2012, Oscar Godson. (MIT Licensed)
*/
<?php
function __fgetcsv(&$handle, $length = null, $d = ",", $e = '"') {
$d = preg_quote($d);
$e = preg_quote($e);
$_line = "";
$eof=false;
while ($eof != true) {
$_line .= (empty ($length) ? fgets($handle) : fgets($handle, $length));
$_line = mb_convert_encoding($_line, "UTF-8", "BIG-5"); // convert big5 to utf8
$itemcnt = preg_match_all('/' . $e . '/', $_line, $dummy);
@ShinyChang
ShinyChang / google.user.js
Last active November 30, 2018 10:55
VoiceTube User Defined JavaScript
+(function(){
"use strict";
// only for google.com
if (!window.location.host.match(/google.com/)) {
return;
}
var input = document.querySelector("input[name=q]");
<!DOCTYPE html>
<html>
<head>
<script src="http://blueimp.github.io/JavaScript-MD5/js/md5.js"></script>
<script src="http://fb.me/react-with-addons-0.13.1.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
@ShinyChang
ShinyChang / Preferences.sublime-settings
Created October 15, 2015 03:24
Sublime Text 3 Settings - User
{
"added_words": // 新增到字典的單字
[
"php",
"href",
"td"
],
"always_show_minimap_viewport": true, // 永遠顯示 minimap 目前顯示的區域
"binary_file_patterns":
[
<?php
header('Access-Control-Allow-Origin: *');
header('Cache-Control: private');
header('Pragma: no-cache');
Header('Connection: Keep-Alive');
Header('Proxy-Connection: Keep-Alive');
Header('Content-Type: application/json;charset=UTF-8');
// generate 2k garbage data
foreach (range(0, 2048) as $key => $value) {
brew install mkcert
brew install nss
mkcert -install
mkcert --cert-file localhost.pem --key-file localhost-key.pem localhost