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
/* | |
sources: | |
http://www.stubbornella.org/content/2010/06/25/the-media-object-saves-hundreds-of-lines-of-code/ | |
http://jsfiddle.net/necolas/rZvEF/ | |
*/ | |
/* ----- REUSABLE IMG BLOCK ----- */ | |
.imgblock { |
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
// source: https://gist.github.com/adunkman/2580972 | |
// background transparency | |
background-transparency(hexColor, alpha = 1) | |
ms-color = argb(hexColor, alpha) | |
background hexToRgb(hexColor) | |
background rgba(hexColor, alpha) | |
.mod-no-rgba & | |
*zoom 1 | |
background transparent |
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
/* | |
* Extend Stylus to allow use of 6 digit hex color | |
* modified from this StackOverflow answer | |
* http://stackoverflow.com/a/9378924/395414 | |
*/ | |
module.exports = function() { | |
var hex = function(n) { | |
return n.toString(16) | |
}; |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"), | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname, | |
filename = path.join(process.cwd(), uri); |
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
body{background-color:#96806B;color:black} | |
#siteTable > div{background-color:white;} | |
#siteTable{background-color:white;padding:10px;border-radius:10px;border:2px solid rgba(0,0,0,0.5);margin-top:10px;} | |
#header{background-color:#96806B;margin:10px;} | |
.side{background-color:white;border: 2px solid rgba(0,0,0,0.5);border-radius:10px;padding:10px;} | |
#sr-header-area{background-color:#96806B;} | |
#header-bottom-right{background-color:#96806B;color:black;margin-top:4px;} | |
#header{border:2px solid rgba(0,0,0,0.5);border-radius:10px;} | |
#RESShortcutsEditContainer{display:none} | |
.content{margin:10px;} |
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
/** | |
* A snippet I created to screen capture full webpages | |
* relies on html2canvas: http://html2canvas.hertzen.com/ | |
* and also requires local proxy for images embedded from other sites: https://github.com/niklasvh/html2canvas/wiki/Proxies | |
* | |
* In this gist I'm using the node.js version of the proxy: https://github.com/BugHerd/html2canvas-proxy-node | |
* | |
* Issues: | |
* | |
* For longer/larger pages I had an issue where the chrome tab would crash if I used PNG or JPEG, but WEBP seems |
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
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 'on'); | |
class DbClass | |
{ | |
// MAMP default credentials for testing. These are not actually real creds that mean anything | |
private $db_url = 'localhost'; | |
private $db_login = 'root'; | |
private $db_pw = 'root'; |
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 is an easy way (at least for me) to manage z-index using Stylus. | |
Using 'hashes' : http://learnboost.github.io/stylus/docs/hashes.html | |
*/ | |
// Step 1 - Setup a hash in your variables | |
// I like to name my keys the exact same thing as the element class/id | |
// from, here I can see the order of my z-indexes and I can move them around easily | |
zarray = { |
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
: inspired by - http://github.com/rmitton/incbin | |
: | |
: Usage: | |
: Windows: template.bat | |
: UNIX: sh template.bat | |
: | |
: ; if false ; then | |
<!--- : Begin batch 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
/* | |
<button id="run">run</button> | |
<button id="clear">clear</button> | |
<div id="log"></div> | |
*/ | |
function run() { | |
try { | |
// put all code here | |