// jQuery
$(document).ready(function() {
// code
})
This file contains 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
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
// Load the TCP Library | |
net = require('net'); | |
// Keep track of the chat clients | |
var clients = []; | |
// Start a TCP Server | |
net.createServer(function (socket) { | |
// Identify this client |
Generates a sitemap.txt
file your website. To use add the contents of the docpad.coffee
file of this gist into your docpad configuration file.
Note: There is now the Sitemap Plugin which generates a proper sitemap.xml
file for you automatically instead of the basic sitemap.txt
file this gist creates.
This file contains 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
# Define our Configuration | |
docpadConfig = | |
# Define our own Collections | |
collections: | |
# Posts | |
# Anything outputted to the posts directory can be considered a post | |
# Sort the posts by newest first | |
# And set their layout to `post` automatically if it isn't already set |
Uses a docpad configuration file to specify template data that we can use in our document to generate absolute urls.
-
Install Moment via
npm install --save moment
-
Add it and a template helper to your docpad configuration file
-
Use the template helper in your app
This file contains 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
# Define our Configuration | |
docpadConfig = | |
# Define our own Collections | |
collections: | |
# Posts | |
# Anything outputted to the posts directory can be considered a post | |
# Sort the posts by newest first | |
# And set their layout to `post` automatically if it isn't already set |
Creates URLs like /2012/12/15/merry-xmas
for your blog posts.
Requires momentjs to be installed: npm install --save moment