Skip to content

Instantly share code, notes, and snippets.

View hqman's full-sized avatar
🏊‍♂️
Focusing

Kai Wang hqman

🏊‍♂️
Focusing
View GitHub Profile
@hqman
hqman / opt ssd
Created February 19, 2013 08:26
opt ssd shell
#!/usr/bin/env bash
#
# SSD 优化脚本.
#
# 用法:
# 保存该脚本为 ssd.sh
# 在终端里运行 sudo ssh.sh
# 关闭 Sudden motion sensor
# SMS 用于笔记本在突然移动时通知硬盘碰头复位, 以保护机械硬盘不受损伤, 对于固态硬盘没有用处.
@hqman
hqman / index.html
Created February 4, 2013 11:12
A CodePen by douglasdeodato. Single Element Pure CSS MacBook Pro - This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
<i class="macbook"></i>
@hqman
hqman / index.html
Created February 4, 2013 11:12
A CodePen by douglasdeodato. Single Element Pure CSS MacBook Pro - This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
<i class="macbook"></i>
@hqman
hqman / index.html
Created February 4, 2013 11:12
A CodePen by douglasdeodato. Single Element Pure CSS MacBook Pro - This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
<i class="macbook"></i>
@hqman
hqman / preventtouchmove
Created November 18, 2012 02:51
ipad prevent touchmove
document.ontouchmove = function(event){
event.preventDefault();
}
#http://stackoverflow.com/questions/7768269/ipad-safari-disable-scrolling-and-bounce-effect
@hqman
hqman / example.html
Created November 18, 2012 01:08 — forked from kylebarrow/example.html
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@hqman
hqman / webkit_inspector_font_size.sh
Created August 6, 2012 14:05 — forked from cowboy/webkit_inspector_font_size.sh
Increase WebKit Inspector's font size (probably will need to re-run after updates)
#!/bin/bash
sudo find '/Applications/Google Chrome.app' \
\( -name inspector.css -or -name devTools.css \) \
-exec sh -c 'cat >> $1 <<WAT
/* Added on `date` */
#drawer .monospace,
#drawer .source-code {
font-size: 18px !important;
@hqman
hqman / restart.sh
Created July 18, 2012 02:52
gunicorn_paster starter for pyramid webapp
#!/bin/bash
### BEGIN INIT INFO
#启动 停止 webapp author wangkai [email protected]
# Short-Description: Start gunicorn_paster.
# Description: Start gunicorn_paster.
### END INIT INFO
PIDFILE=WEBAPP.PID
ENVINI=development.ini
@hqman
hqman / gist:3074740
Created July 9, 2012 07:08 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@hqman
hqman / dabblet.css
Created June 4, 2012 12:40
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;