Skip to content

Instantly share code, notes, and snippets.

View amdgigabyte's full-sized avatar
🤘
Working at Alibaba Growth Hacker Team

ZhangZipeng amdgigabyte

🤘
Working at Alibaba Growth Hacker Team
View GitHub Profile
@jmaxhu
jmaxhu / .git-commit-template.txt
Last active August 21, 2023 06:29 — forked from adeekshith/.git-commit-template.txt
一份建议的git commit模板
# <类型>: (类型的值见下面描述) <主题> (最多50个字)
# 解释为什么要做这些改动
# |<---- 请限制每行最多72个字 ---->|
# 提供相关文章和其它资源的链接和关键字
# 例如: Github issue #23
# --- 提交 结束 ---
# 类型值包含
@guilherme
guilherme / gist:9604324
Last active May 17, 2024 14:09
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
@zaphar
zaphar / requirejs-shim-polymer-element
Last active December 23, 2015 02:09
A polymer custom element that can load requirejs modules. You may have to modify the paths to suite your setup.
<polymer-element name="require-js" attributes="libnames event">
<script>
(function() {
// Helper function to add a script.
var addScript = function(src) {
var script = document.createElement('script');
script.src = src;
var s = document.querySelector('script');
s.parentNode.insertBefore(script, s);
return script;
@drkibitz
drkibitz / gist:6143035
Last active April 23, 2020 16:37
pixi.js IntactionManager Example Usage 2
// create an new instance of a pixi stage
var stage = new PIXI.Stage(0x66FF99);
// create a renderer instance
var renderer = PIXI.autoDetectRenderer(400, 300);
// create a manager instance, passing stage and renderer.view
var manager = new PIXI.InteractionManager(stage, renderer.view);
stage
.on('click', function (event) {
console.log(event.type, event.target); // 'click', PIXI.DisplayObject {}
@Yexiaoxing
Yexiaoxing / README.md
Last active June 26, 2018 03:49
Plugin for Jekyll to insert videos from Youku or Tudou.

这是一个用于Jekyll的youku、tudou嵌入插件。

This is a plugin meant for Jekyll.

用例:

Example use:

将youku.rb和/或tudou.rb文件拷贝至_plugins目录下,然后在文章中输入以下代码即可嵌入。

@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@ikennaokpala
ikennaokpala / install_nginx.sh
Created July 17, 2011 23:36
install and start up nginx automaically on a mac
sudo mkdir -p /usr/local/src
sudo curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.02.tar.gz
cd /usr/local/src
tar xvzf pcre-8.02.tar.gz
cd pcre-8.02
./configure --prefix=/usr/local
make
sudo make install
@kejun
kejun / GM Script: 自动用xiami播放专辑
Created January 12, 2011 10:29
Douban音乐推荐直接用xiami播放
// ==UserScript==
// @name douban_xiami
// @namespace org.kejun
// @include http://music.douban.com/*
// ==/UserScript==
//使用说明:
// 1. 安装本脚本到Greasemonkey
// 2. 到http://music.douban.com/recommended
// 3. 点击专辑封面会自动用虾米播放(如果窗口没弹出,检查是否被浏览器拦截)