Skip to content

Instantly share code, notes, and snippets.

View piscis's full-sized avatar
🧱
¯\_(ツ)_/¯

Alex piscis

🧱
¯\_(ツ)_/¯
View GitHub Profile
(function($) {
var tmpl = '';
tmpl += '<div class="ui-grid-b">';
tmpl += '<div class="ui-block-a" id=""><div class="ui-bar ui-bar-c" style="height:120px"><a href="#overview" data-role="button" class="ui-btn-right" data-icon="delete">Overview</a></div></div>';
tmpl += '<div class="ui-block-b"><div class="ui-bar ui-bar-c" style="height:120px"><a href="#device" data-role="button" class="ui-btn-right" data-icon="delete">Device</a></div></div>';
tmpl += '<div class="ui-block-c"><div class="ui-bar ui-bar-c" style="height:120px"><a href="#mapview" data-role="button" class="ui-btn-right" data-icon="delete">Map View</a></div></div>';
tmpl += '<div class="ui-block-a"><div class="ui-bar ui-bar-c" style="height:120px">A</div></div>';
tmpl += '<div class="ui-block-b"><div class="ui-bar ui-bar-c" style="height:120px">B</div></div>';
@piscis
piscis / gist:1031244
Created June 17, 2011 11:23
create a shortlink
curl http://crop.io/v1/c/?lurl=http%3A//www.example.org
@piscis
piscis / copy.js
Created April 13, 2011 16:14 — forked from c4milo/copy.js
// fs.copy(src,dst) && fs.copySync(src,dst)
var copy = function copy(src, dst, callback) {
var self = this;
if(!callback) {
callback = function(){};
}
self.on('error', function(err) {
@piscis
piscis / express htaccess example
Created January 15, 2011 10:00
Protecting express via connect basic auth plugin
var express = require('express');
var app = express.createServer();
// User validation
var auth = express.basicAuth(function(user, pass) {
return (user==pass) ? true : false;
},'Admin Area');
app.get('/hello', auth, function(req,res) {
res.writeHead("200");