Skip to content

Instantly share code, notes, and snippets.

.site{
display:-ms-grid;
display:grid;
-ms-grid-columns:2fr 1fr;
grid-template-columns:2fr 1fr;
grid-template-areas:"header header"
"title sidebar"
"main sidebar"
"footer footer";
margin:20px; padding:10px; border:solid 2px #000;
window.FUTURI_STATION_KEY = 'kzrc';
window.FUTURI_ENGAGE_BASE_URL = 'https://d1gm7n6w0pishx.cloudfront.net/production-fbd8fd1/';
var head = document.head, script = document.createElement('script');
script.src = FUTURI_ENGAGE_BASE_URL + 'embed.js';
head.appendChild(script);
@rpastorelle
rpastorelle / gist:9053260
Created February 17, 2014 16:00
Boilerplate
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico and apple-touch-icon(s) in the root directory -->
@rpastorelle
rpastorelle / dabblet.css
Created April 13, 2013 20:21
Tackk AppPanel
/**
* Tackk AppPanel
*/
* { box-sizing: border-box; }
body{ padding: 0px; margin: 0; color: #ccc; }
#app-panel{
border: 1px solid blue;
background: rgba(39, 39, 39, 0.88);
height: 100%;
width: 270px;
@rpastorelle
rpastorelle / gist:5273647
Last active December 15, 2015 14:19
Sample DB Model Class
<?php
// Extending from "Model"
class DBTableName extends Model {
// --------------------------
// PROPERTIES
// --------------------------
/**
* schema must be defined. array of fields in the DB
**/
@rpastorelle
rpastorelle / gist:5083561
Last active December 14, 2015 11:59
Query Product Reviews for previous 7 day period.
SELECT p.ProductCode, p.ProductName,
r.ReviewTitle, r.Rate, r.ReviewDescription,
r.LastModified
FROM Products p
INNER JOIN Reviews r ON r.ProductCode = p.ProductCode
WHERE r.LastModified
BETWEEN CONVERT( VARCHAR(10) DATEADD(day, -7, GETDATE()), 101 ) + ' 0:00'
AND CONVERT( VARCHAR(10) DATEADD(day, -1, GETDATE()), 101 ) + ' 23:59'
ORDER BY r.LastModified DESC
@rpastorelle
rpastorelle / link to nowhere
Created February 21, 2013 01:49
A link that does nothing
@rpastorelle
rpastorelle / gist:4120265
Created November 20, 2012 19:06
JS Module Pattern
var myModule = (function(){
var myItems = []; // private
return {
init: function(){
/*implementation*/
},
addItem: function(values){
myItems.push(values);
},
getItemCount: function(){ return myItems.length; }
@rpastorelle
rpastorelle / gist:4120177
Created November 20, 2012 18:58
Better setInterval
(function(){
doStuff();
setTimeout(arguments.callee, 100);
})();
@rpastorelle
rpastorelle / gist:4120173
Created November 20, 2012 18:57
JS IIFE
(function(window, undefined){ ... })(window);