Skip to content

Instantly share code, notes, and snippets.

View alvincrespo's full-sized avatar
:shipit:
Shipping Code.

Alvin Crespo alvincrespo

:shipit:
Shipping Code.
View GitHub Profile
@alvincrespo
alvincrespo / utils.js
Created November 8, 2011 15:42
A polyfill for the placeholder attribute
var Utils = Utils || {};
Utils = (function (window, $) {
var _c, _private, _public;
_private = {
/**
* @event
@alvincrespo
alvincrespo / TouchEvent.js
Created December 4, 2012 17:45
Touch event detection
/**
@class
@description Checks for touch events and returns the appropriate supported touchevent
*/
(function(){
var TouchEvent = (function() {
// Mapping of Events, for easier reference
var events = {
'START': 'ontouchstart',
'MOVE': 'ontouchmove',
@alvincrespo
alvincrespo / gist:4216671
Created December 5, 2012 15:40
CSS3 Gradients with Background Images
/* Old browsers */
background: #a09e91;
background: url('path/to/image.png') no-repeat 0 0;
/* FF3.6+ */
background: url('path/to/image.png') no-repeat 0 0, -moz-linear-gradient(top, #ffffff 0%, #a09e91 75%);
/* Chrome,Safari4+ */
background: url('path/to/image.png') no-repeat 0 0, -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(75%,#a09e91));
/* Chrome10+,Safari5.1+ */
background: url('path/to/image.png') no-repeat 0 0, -webkit-linear-gradient(top, #ffffff 0%,#a09e91 75%);
/* Opera 11.10+ */
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
@alvincrespo
alvincrespo / gist:6091742
Created July 26, 2013 19:50
Configuring GIT for SSH
git config --global url."https://".insteadOf git://
@alvincrespo
alvincrespo / gist:6140491
Created August 2, 2013 14:54
Current SublimeText User Settings
{
"font_size": 12.0,
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
"translate_tabs_to_spaces": true,
"word_wrap": "false"
}
@alvincrespo
alvincrespo / package.json
Last active December 26, 2015 08:29
Sample package.json
{
"name": "",
"version": "",
"description": "",
"keywords": [],
"homepage": "",
"bugs": {
"url": "",
"email": ""
},
@alvincrespo
alvincrespo / deploy.js
Last active August 29, 2015 13:58
An S3 deploy script for ember-cli
/**
* Example: node deploy.js
*
* Getting Started
* Change BUCKET_NAME
* Create AwsConfig.json in same directory as deploy.js
*
* References: Ken Tabor (NodeJS Deploying Files to AWS S3)[http://blog.katworksgames.com/2014/01/26/nodejs-deploying-files-to-aws-s3/]
*/
@alvincrespo
alvincrespo / .tmux.conf
Created June 3, 2014 12:57
Tmux Configuration
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# use PREFIX | to split window horizontally and PREFIX - to split vertically
@alvincrespo
alvincrespo / .vimrc.after
Created June 18, 2014 13:21
.vimrc.after
" Mouse Support
set mouse=a
set ttymouse=xterm2
" Uncomment in order to disabling tmp and swp files
"set nobackup
"set nowritebackup
"set noswapfile
" Moves tmp and swp files outside of the working directory