If you want to keep your templates in external files, you can load the template in like so:
$.get('/js/templates/filename.html', function(template) {
$.tmpl(template, data).appendTo('#whatever');
});
# EDITOR=nano sudo visudo | |
# Change the following line: (:i to insert + esc to go back + :w to save + :q to quit) | |
# Defaults env_reset | |
# to: | |
# Defaults env_reset,timestamp_timeout=960 # in minutes | |
export PATH=$PATH:. | |
# export PATH=$PATH:/usr/bin |
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
<system.webServer> | |
<httpProtocol> | |
<customHeaders> | |
<!-- | |
Allow Web API to be called from a different domain. | |
http://dlr2008.wordpress.com/2012/04/26/asp-net-web-api-cross-domain-ajax-and-server-techniques-jsonp-and-cors/ | |
--> | |
<add name="Access-Control-Allow-Origin" value="*" /> | |
</customHeaders> | |
</httpProtocol> |
var vm = require('vm'); | |
var code = function run() { | |
for(var i=0; i<Infinity; i++) { | |
i++; | |
} | |
}; | |
var sandbox = { | |
setTimeout: setTimeout |
Here is a simple jQuery plugin to make a table header fixed on top when window is scrolled. | |
Using the code from twitter bootstrap documentation page, this code is customized for table header. | |
Create the table with following layout - | |
<table class="table-fixed-header"> | |
<thead class="header"> | |
<tr> | |
<th>Column 1</th> | |
<th>Column 2</th> | |
<th>Column 3</th> |
If you want to keep your templates in external files, you can load the template in like so:
$.get('/js/templates/filename.html', function(template) {
$.tmpl(template, data).appendTo('#whatever');
});
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(3000); |
<?php | |
//Get data from instagram api | |
$hashtag = 'max'; | |
//Query need client_id or access_token | |
$query = array( | |
'client_id' => '', | |
'count' => 3 | |
); | |
$url = 'https://api.instagram.com/v1/tags/'.$hashtag.'/media/recent?'.http_build_query($query); |
---superfish | |
users.tpg.com.au/j_birch/plugins/superfish/ | |
---jquery drop box | |
http://jamielottering.github.com/DropKick/ | |
---scroll pane | |
http://jscrollpane.kelvinluck.com | |
----scroll path | |
http://joelb.me/scrollpath/ | |
----background stretch | |
http://srobbin.com/jquery-plugins/backstretch/ |