(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "[email protected]"
cd /develop/myrepo
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("") | |
base = alphabet.length | |
exports.encode = (i) -> | |
return alphabet[0] if i is 0 | |
s = "" | |
while i > 0 | |
s += alphabet[i % base] | |
i = parseInt(i / base, 10) |
window.onerror = function(errorMsg, url, lineNumber) { | |
alert('noobface, plz'); | |
alert('foo'); | |
}; |
(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "[email protected]"
cd /develop/myrepo
//After build | |
Command : cp -r ${ProjectDir}/bin/iPhone/Release/MyAppName.app toZip/Payload | |
Working Directory: ${SolutionDir} | |
//AfterBuild | |
Command : zip -r ../MyApp.ipa * | |
WorkingDirectory: ${SolutionDir}/toZip |
@root_dir = File.expand_path(File.join(File.dirname(__FILE__), "../../")) | |
$: << File.join(@root_dir, "lib") | |
$: << File.join(@root_dir, "spec") | |
$: << File.join(@root_dir, "spec/patches") | |
$: << File.join(@root_dir, "spec/support") | |
$: << File.join(@root_dir, "lib/albacore/config") | |
string xml = @" | |
<root xmlns='http://www.w3.org/TR/html4/' xmlns:h='http://www.w3.org/TR/html4/' xmlns:f='http://www.w3schools.com/furniture'> | |
<h:table><h:tr><h:td>Apples</h:td><h:td>Bananas</h:td></h:tr></h:table><f:table><f:name>African Coffee Table</f:name> | |
<f:width>80</f:width><f:length>120</f:length></f:table></root>"; | |
XElement x = XElement.Parse(xml); | |
(from node in x.DescendantsAndSelf() | |
where node is XElement | |
from attr in node.Attributes() | |
where attr.IsNamespaceDeclaration && attr.Name.LocalName == "xmlns" | |
select attr).All(attr => { attr.Remove(); return true; }); |
if (!window.localStorage || !window.sessionStorage) (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |