Skip to content

Instantly share code, notes, and snippets.

View hyjk2000's full-sized avatar

James Shih hyjk2000

View GitHub Profile
@hyjk2000
hyjk2000 / dabblet.css
Created February 19, 2014 16:23
iOS 7 Clock
/**
* iOS 7 Clock
*/
body {
font-size: 12px;
}
.icon {
display: inline-block;
@hyjk2000
hyjk2000 / dabblet.css
Created March 21, 2014 02:35
iOS 7 Checkbox
/**
* iOS 7 Checkbox
*/
.fancyChkbox {
border: 2px solid #e3e3e3;
border-radius: 1.5em;
background: #fff;
cursor: pointer;
display: inline-block;
@hyjk2000
hyjk2000 / dabblet.css
Last active October 8, 2015 08:22
Styling HTML5 progress Element
/**
* Styling HTML5 progress Element
*/
progress[value] {
appearance: none;
position: relative;
width: 500px;
height: 30px;
}
@hyjk2000
hyjk2000 / example.conf
Last active January 3, 2019 21:04
Nginx Virtual Host for PhalconPHP with Gzip and Expires
server {
listen 80;
server_name example.com;
# server_name _; # if no server name
root /usr/share/nginx/www/example.com/public;
index index.php index.html index.htm;
# rewrite to Phalcon bootstrap
try_files $uri $uri/ @rewrite;
@hyjk2000
hyjk2000 / uninstall_bocd.sh
Created March 31, 2015 12:14
卸载Mac版成都银行网银控件及U盾驱动
#!/bin/bash
cd /Applications
rm -rf BOCD_ePassUserMgr.app EnterSafe_2001_showUI.app
cd /Library/Application\ Support
rm -rf Microdone
cd /usr/lib
rm -rf libePass_BOCD_p11.sig libePass_BOCD_p11.dylib
@hyjk2000
hyjk2000 / juggling-async-promise.js
Created May 19, 2015 03:43
Solving Juggling Async problem from learnyounode with ES6 Promise
var http = require('http')
, bl = require('bl')
, urls = process.argv.slice(2)
function httpGet(url) {
return new Promise(function (resolve, reject) {
http.get(url, function (response) {
response.pipe(bl(function (err, data) {
if (err) reject(err)
resolve(data.toString())
@hyjk2000
hyjk2000 / OS X Dock.markdown
Last active August 29, 2015 14:24
OS X Dock
@hyjk2000
hyjk2000 / getusermedia.html
Created October 22, 2015 02:54
navigator.getUserMedia
<!DOCTYPE html>
<html>
<head>
<title>navigator.getUserMedia</title>
<style>
video.local { transform: rotateY(180deg); }
</style>
</head>
<body>
<video class="local" autoplay></video>
@hyjk2000
hyjk2000 / material-theme-secure-shell.json
Created November 12, 2015 02:22
Material Theme for Chrome Secure Shell
{"magic":"nassh-prefs","version":1,"nassh":{},"hterm":{"default":{"background-color":"rgba(50, 65, 72, 1)","cursor-color":"rgba(101, 123, 131, 0.5)","color-palette-overrides":["#073642","#EB606B","#C3E88D","#F7EB95","#80CBC4","#FF2490","#AEDDFF","#FFFFFF"],"font-family":"'Fira Code', 'Source Code Pro', Menlo, Consolas, monospace","font-size":14,"font-smoothing":"antialiased","foreground-color":"rgba(196, 199, 209, 1)"}}}
@hyjk2000
hyjk2000 / vagrant-atlas-download.es5.js
Created January 20, 2016 05:56
Varant Atlas download button
'use strict';
(function () {
function $(selector) {
var elem = arguments.length <= 1 || arguments[1] === undefined ? document : arguments[1];
return elem.querySelector(selector);
};
function $$(selector) {
var elem = arguments.length <= 1 || arguments[1] === undefined ? document : arguments[1];