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
// this function will load the main content from subsequent pages | |
function loadMain(e){ | |
// define a reference to the href val | |
var targetVal = e.currentTarget.attributes[0].nodeValue; | |
// create wrapper elem if needed | |
if (!$('#wrap').length){ | |
$('<div id=wrap />').insertAfter('header'); | |
} | |
// prepare wrapper, pass href target from event obj | |
$('#wrap').empty().load(targetVal + ' #main', function(){ |
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
jQuery(function(){ | |
// Execute this code when the page is ready to work | |
// Create a Script Tag | |
var script=document.createElement('script'); | |
script.type='text/javascript'; | |
script.src= "http://search.twitter.com/search.json?&q=%23Ogilvy&callback=processTheseTweets&_="+ new Date().getTime(); | |
// Add the Script to the Body element, which will in turn load the script and run it. | |
$("body").append(script); | |
}); |
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
function getData(){ | |
$.get('http://localhost:3000/posts.json'); | |
} | |
function postData(){ | |
var url ='http://localhost:3000/posts'; | |
var data = {title:"asdf",content:"asdf"}; | |
$.ajax({ | |
type: "POST", |
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
<!doctype html> | |
<html> | |
<head> | |
<link href="/css/ui-lightness.css" /> | |
<link href="/css/style.css" /> | |
</head> | |
<body> | |
<div></div> | |
<script src="/js/jquery.js"></script> | |
<script src="/js/jqueryui.js"></script> |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl http://npmjs.org/install.sh | sh |
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
node_modules |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, Mongolian = require("mongolian") | |
var app = module.exports = express.createServer(); |
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
cat ~/.ssh/id_rsa.pub | pbcopy | |
pbcopy <~/.ssh/id_rsa.pub |
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
# deploy on nodester | |
nodester app create bysoft | |
nodester app init bysoft | |
# app deployed on bysoft.nodester.com | |
# deploy on heroku (incl package.json) |
OlderNewer