Skip to content

Instantly share code, notes, and snippets.

View gonghao's full-sized avatar
😂
Nothing

Howtin gonghao

😂
Nothing
View GitHub Profile
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@mockee
mockee / mobile-meta-links.html
Created May 6, 2012 02:49
iOS Web App Configuration
@chappy84
chappy84 / linode-centos-6-or-newer-native-kernel.sh
Last active February 13, 2018 21:47
Install the native kernel on a CentOS 6 and Newer Linode
### Starting from a fresh CentOS 6 or newer Linode
### Enable the native kernel to boot from pvgrub
### It will autoconfigure itself with each yum update.
### This is adapted from a previous script for CentOS 5.5 found here:
### http://www.linode.com/docs/assets/542-centos5-native-kernel-selinux-enforcing.sh
### Provided via the linode wiki
### https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distributionsupplied-kernel-with-pvgrub#centos-5
### Provided without warranty, although since it should only be run
### on first box build if your box gets broken simply rebuild it
@simX
simX / hidpi.txt
Created July 28, 2012 04:58
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@hzlzh
hzlzh / v2ex-notification.js
Created September 17, 2012 13:52
V2EX notification
/*
@Name: V2EX reply pusher on HTML5 notification API
@URL: http://hzlzh.github.com/project/v2ex-notification/
@Twitter: @hzlzh
*/
// notification close delay time
var AUTO_CLOSE_DELAY_SECONDS = 6, updated_time = '',
refresh_time = 5,
V2EX_RSS = $('.sll').val();
@dexteryy
dexteryy / storage.js
Created October 26, 2012 03:04
storage.js
/**
* @import lib/oz.js
* @import lib/jquery.js
* @import mod/event.js
* @import mod/lang.js
*/
define("mod/storageclass", ["lib/jquery", "mod/event", "mod/lang"], function($, Event, _){
var fnQueue = _.fnQueue;
/**
@CMGS
CMGS / README.md
Last active December 11, 2015 11:08 — forked from Ins1ne/README.md

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: