Skip to content

Instantly share code, notes, and snippets.

View fuchao2012's full-sized avatar
🎯
Focusing

zheng fuchao2012

🎯
Focusing
View GitHub Profile
@fuchao2012
fuchao2012 / git-tag-delete-local-and-remote.sh
Created May 21, 2018 12:16 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@fuchao2012
fuchao2012 / gist:5a21cdddb5ad8ee35ee501182ca3ea88
Created December 25, 2017 07:30 — forked from dvliman/gist:10016069
join honey chrome extension
chrome.runtime.onStartup.addListener(function () {
chrome.storage.local.set({
log: ""
})
});
chrome.runtime.onInstalled.addListener(function (a) {
var b = {
log: ""
};
b.site_manifest = {
@fuchao2012
fuchao2012 / gist:264ed6269a8483301c5940915de1c8f8
Created December 25, 2017 07:30 — forked from dvliman/gist:10016069
join honey chrome extension
chrome.runtime.onStartup.addListener(function () {
chrome.storage.local.set({
log: ""
})
});
chrome.runtime.onInstalled.addListener(function (a) {
var b = {
log: ""
};
b.site_manifest = {
@fuchao2012
fuchao2012 / gist:3cc80285715739a42af2745295751418
Created March 13, 2017 03:07 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@fuchao2012
fuchao2012 / hrtime.js
Created October 8, 2015 09:35 — forked from LiuJi-Jim/hrtime.js
HRT(High Resolution Timing) in JavaScript
var hrtime = (function(){
if (typeof window !== 'undefined'){
// browser
if (typeof window.performance !== 'undefined' && typeof performance.now !== 'undefined'){
// support hrt
return function(){
return performance.now();
};
}else{
// oh no..
/**
* Returns value of specified URL parameter.
* @param {String} name Query parameter to return value of.
* @return {String} String of query parameter or null / 0.
*/
getUrlParameter = function(name){
var results = new RegExp('[\\?&]' + name + '=([^&#?]*)').exec(window.location.href);
if (results==null){ return null; }
else { return results[1] || 0; }
}
@fuchao2012
fuchao2012 / css_resources.md
Last active August 29, 2015 14:21 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@fuchao2012
fuchao2012 / javascript_resources.md
Last active August 29, 2015 14:21 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@fuchao2012
fuchao2012 / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console