Skip to content

Instantly share code, notes, and snippets.

:octocat:
#building

Leon Gaban leongaban

:octocat:
#building
Block or report user

Report or block leongaban

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@leongaban
leongaban / SassMeister-input.scss
Created Mar 7, 2014
SASS mixin for Pixels to EM
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// ----
/* PIXELS to EM */
// eg. for a relational value of 12px write em(12) when the parent is 16px
// if the parent is another value say 24px write em(12, 24)
// @include em(12);
View gist:9960219

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@leongaban
leongaban / each loop function to create objects
Last active Aug 29, 2015
.each to create Objects (jQuery)
View each loop function to create objects
addedPhones = $('.added_phone');
addedPhones.each( function(i) {
var tag = $(this).children("label").text();
var value = $(this).children("input").val();
phoneObjs = $(this).map(function(i,el) {
var $el = $(el);
return {
label: value,
tag: tag
@leongaban
leongaban / _queries.scss
Created Nov 5, 2014
Boiler plate for Responsive Media Queries
View _queries.scss
/* RESPONSIVE MEDIA QUERIES
====================================================
==================================================== */
/* 1600
==================================================== */
@media all and (max-width: 1600px) {
}
/* 1400
@leongaban
leongaban / server.js
Last active Aug 29, 2015
server.js routes api
View server.js
// load the express package and create our app
// CALL THE PACKAGES --------------------
var express = require('express'); // call express
var app = express(); // define our app using express
var bodyParser = require('body-parser'); // get body-parser
var morgan = require('morgan'); // used to see requests
var mongoose = require('mongoose'); // for working w/ our database
var port = process.env.PORT || 8615; // set the port for our app
// BASE SETUP
@leongaban
leongaban / express.sublime-snippet
Created Feb 18, 2015
Sublime Text 2 - ExpressJS snippet
View express.sublime-snippet
<snippet>
<content><![CDATA[
var express = require('express'),
app = express();
app.get('/', function(req, res) {
res.sendfile(__dirname + '/client/views/index.html');
})
app.listen(${1:this}, function() {
View _mixins.scss
@mixin box-shadow($top, $left, $blur, $color, $inset: false) {
@if $inset {
-webkit-box-shadow:inset $top $left $blur $color;
-moz-box-shadow:inset $top $left $blur $color;
box-shadow:inset $top $left $blur $color;
} @else {
-webkit-box-shadow: $top $left $blur $color;
-moz-box-shadow: $top $left $blur $color;
box-shadow: $top $left $blur $color;
}
@leongaban
leongaban / sass-buttons.scss
Created Mar 9, 2015
SASS buttons using extend
View sass-buttons.scss
/* Buttons
============================================================
========================================================= */
// button:disabled {
// background: $gray;
// }
%button {
color: #fff;
@leongaban
leongaban / gist:5882b14e9b39a1c623af
Created Mar 10, 2015
jQuery : bind unbind click()
View gist:5882b14e9b39a1c623af
// jQuery button click bind
$('').unbind('click').bind('click', function (event) {
});
View scopeFactory
/*global angular*/
/* =========================================
--------------------------------------------
Save a scope:
var vs = $scope;
ScopeFactory.saveScope('alerts', vs);
Retrieve a scope:
var alertScope = ScopeFactory.getScope('alerts');
You can’t perform that action at this time.