Javascript cloth simulation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rubbish = []; | |
// Method 1, Suppose be memory efficient | |
// because we reuse the 2 function instance on the prototype chain | |
var MethodOnProto = function(){ | |
}; | |
MethodOnProto.prototype.method1 = function(){ | |
this.method2(); | |
}; | |
MethodOnProto.prototype.method2 = function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: MusicSeekerX [32987] | |
Path: /Applications/MusicSeekerX.app/Contents/MacOS/MusicSeekerX | |
Identifier: MusicSeekerX.MusicSeekerX | |
Version: 3.3 (3.3) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [260] | |
User ID: 501 | |
Date/Time: 2013-02-19 10:00:26.911 +0800 | |
OS Version: Mac OS X 10.8.2 (12C60) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var g1 = new Gadget(); | |
var Extended = Gadget.extend({ | |
'hub/test': function(topic, arg){ | |
assert.same(test_args, arg) | |
return [test_args.reverse()]; | |
} | |
}); | |
var e1 = new Extended(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(){ | |
for(var i = 0; i < 66999;i++){ | |
var key = new Bitcoin.ECKey(false); | |
var bitcoinAddress = key.getBitcoinAddress(); | |
var privateKeyWif = key.getBitcoinWalletImportFormat(); | |
var testkey = bitcoinAddress.toLowerCase(); | |
if ( | |
testkey.indexOf('norm') == 1 || | |
testkey.indexOf('hongyu') == 1 || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.btn-facebook | |
{ | |
position: relative; | |
display: inline-block; | |
outline: 1px solid #29447e; | |
border-top: 1px solid #879ac0; | |
width: auto; | |
height: 38px; | |
padding: 0 14px 0 54px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validateEmail(email) { | |
// The real RFC complain email format check will be something look like this | |
// http://ex-parrot.com/~pdw/Mail-RFC822-Address.html | |
// so let's make a very loose check here to let go most cases | |
if ( typeof email != "string" ) { | |
return false; | |
} | |
var pstAt = email.indexOf('@'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function appendParam(url, param){ | |
var parts = url.split(/\?([^#]*)#?/); | |
var host = parts.shift(); | |
var hash = parts.pop(); | |
var params = parts == 0 ? [] : parts.join('?').split('&'); | |
params.push(param); | |
return host + '?' + params.join('&') + ((hash == null || hash == 0) ? '' : ('#' + hash)); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open mobile safari | |
echo Open mobile safari on emulator and press return | |
read | |
# Plug debug to MobileSafari.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.getLogs = (function (){ | |
var inner = function(){return ""}; | |
require(['src/shim/console','src/differ'], function(console, differUtil){ | |
var oldLogs = console.logs(); | |
inner = function(){ | |
var logs = console.logs(); |