Skip to content

Instantly share code, notes, and snippets.

View potench's full-sized avatar

Christian Shum-Harden potench

View GitHub Profile
var Ex = Ex || {};
Ex.A = RED.Class.extend({
init : function() {
this.resize = this.delegate(this, this.resize); // encapsulates to keep scope
$(window).bind('resize', this.resize);
$("body").bind('click', this.delegate(this,function() {
console.log('clicked');
@potench
potench / gist:1215605
Created September 14, 2011 01:00
Developer Notes - Sept 13th
@potench
potench / Developer meeting Sept 20th
Created September 21, 2011 01:19
Developer meeting Sept 20th
notes moved to https://redmine.ff0000.com/projects/web-dev/wiki/9-20-11
@potench
potench / dabblet.css
Created January 26, 2012 18:40
"Confidentiality Notices are completely unenforceable - you can't send someone an email that legally binds them to not speaking without their consent"
/**
* "Confidentiality Notices are completely unenforceable - you can't send someone an email that legally binds them to not speaking without their consent"
*/
body {
background: #fff;
min-height:100%;
}
span.action {
position:absolute;
-moz-transform: rotate(25deg);
@potench
potench / dabblet.css
Created February 10, 2012 01:30 — forked from anonymous/dabblet.css
Polaroid Header
/**
* Polaroid Header
*/
/*normalize*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{ border:0;}address,caption,cite,code,dfn,em,th,var{font-style:normal;font-weight:normal;}ol,ul{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;}section,hgroup,nav{display:block;position:relative;text-align:left;}
/* FLOAT CLEARING */
.clearfix:after { clear: both; content: "."; display: block; height: 0px; visibility: hidden;}
*+html .clearfix { *zoom:1; }
* html .clearfix { height:1%;}
@potench
potench / gist:1821512
Created February 13, 2012 23:42
Color management setup for everyone

Color Management:

So after a lot of debate with a couple of the front end guys we agreed that what we had to find was a system that would allow us to ensure color consistency from PSDs to HTML or Flash.

In the end the only way to ensure this issue was solved was to run some tests which yielded the following setup to guarantee color consistency:

Setting Up Photoshop Color Space

The first thing we all have to do is to ensure we are working under the correct color profiles. To do this follow these steps:

@potench
potench / gist:1822234
Created February 14, 2012 01:08
Tilt / Scroll
(function () {
var min_tilt = 15, // minimum the user must tilt to start the scroll
max_speed = 5, // maximum tilt scrolling speed
gravity : .3, // easing
velocity:0 // current velocity
setScroll = (function (delta) {
if(Math.abs(delta) > min_tilt){ // scroll
var cur_vel = - Math.max(-max_speed, Math.min(max_speed, (delta / min_tilt) * 3));
@potench
potench / dabblet.css
Created April 3, 2012 17:28
HTML - Color Management guidelines and shortcuts
/**
* HTML - Color Management guidelines and shortcuts
*/
body {
background: #f06;background: linear-gradient(45deg, #fff, #c6c6c6);
min-height: 100%;
}
.content {
padding:30px;
@potench
potench / gist:2931275
Created June 14, 2012 16:21
TXJS Notes

frontend-dev-baseline

frontend-dev-baseline - rmurphey - pinboard of links for dev-tools you should be using -

  • Grunt /
  • AMD /
  • Testing your JavaScript
  • Using break; and stepping in chrome-dev tools

Regex explained