Skip to content

Instantly share code, notes, and snippets.

@fguillen
fguillen / git_tips.md
Created December 19, 2010 20:53
Git Tips

(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )

Git tips

Global git user

git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"

Repository git user

cd /develop/myrepo

@RhinoLu
RhinoLu / findNumberInRange.as
Created October 18, 2011 08:43
尋找特定數值是否在區間範圍內
package
{
import flash.display.Sprite;
public class Main extends Sprite
{
private var _labelArray:Array = [10, 30, 50, 70, 90];
private var _midDotArray:Array;
private var _combineArray:Array;
private var _newMidDotArray:Array;
@paulirish
paulirish / rAF.js
Last active July 2, 2024 11:59
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@conorbuck
conorbuck / angle-between-points.js
Created May 5, 2012 22:51
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@davidwkeith
davidwkeith / index.html
Last active May 28, 2024 07:25
NOTE: This was a great hack in days gone by, but now both Apple and Google have improved their support for custom protocol handlers. Licensed under the WFTPL http://www.wtfpl.net/txt/copying/
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>App Redirection</title>
</head>
<body>
<!--
NOTE: This was a great hack in days gone by, but now both Apple and Google have improved their support for custom
protocol handlers.
@nicerobot
nicerobot / README.md
Last active June 18, 2024 19:46
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@skovalyov
skovalyov / URLUtil.as
Created June 5, 2012 07:58
How to prevent pop-up blocking in Firefox
package {
import flash.external.ExternalInterface;
public class URLUtil {
protected static const WINDOW_OPEN_FUNCTION : String = "window.open";
public static function openWindow(url : String, window : String = "_blank", features : String = "") : void {
ExternalInterface.call(WINDOW_OPEN_FUNCTION, url, window, features);
// tests
// returns height of the screen including all toolbars
// requires detection of orientation. (320px for our test)
// window.orientation === 0 ? screen.height : screen.width
// returns height of the visible area
// it decreases if you zoom in
// window.innerHeight
// returns height of screen minus all toolbars
@coodoo
coodoo / starling.js
Created May 6, 2013 02:25
Starling.js source code, slightly annotated. Starling.js is a canvas based drawing framework, ported from iOS to AS3 to Javascript. Demo: http://gamua.com/area-51/
/*
RequireJS 2.1.4 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
Available via the MIT or new BSD license.
see: http://github.com/jrburke/requirejs for details
*/
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/
@hanksudo
hanksudo / Front-end-Developer-Interview-Questions-TC.md
Last active May 2, 2024 06:26
Front-end-Developer-Interview-Questions - 前端工程師面試問題集(繁體中文版)

前端工程師面試問題集

@版本 2.0.0

譯注:此翻譯版,主要給不能流利的讀英文的人看,相關專有名詞還是保留原文。翻譯不好地方請協助pull request.

此repository包含了一些前端開發的面試問題,來審查一個有潛力的面試者。這並不是建議你對同一個面試者問上所有的問 (那會花費好幾小時)。從列表中挑幾個題目,應該就夠幫助你審查面試者是否擁有你需要的技能。

Rebecca MurpheyBaseline For Front-End Developers 也是一篇很棒且值得讀的文章在你開始面試之前。