Skip to content

Instantly share code, notes, and snippets.

View leongaban's full-sized avatar

Leon Gaban leongaban

View GitHub Profile
@leongaban
leongaban / fix-html-comments-sublime
Created March 29, 2015 20:59
Fixing auto comments in HTML files in Sublime Text 2 & 3
http://wesbos.com/fix-sublime-text-toggle-comment/
The underlying problem is inside the HTML syntax file and it is actually an easy fix.
We need to edit the HTML.tmLanguage file that is located in preferences → browse packages → HTML.
Open it up and look for a line that looks like the following. It should be around line 286.
<string>(?:^\s+)?(&lt;)((?i:script))\b(?![^&gt;]*/&gt;)</string>
@leongaban
leongaban / tickersPanelDirectives
Last active August 29, 2015 14:20
tickersPanelDirectives
/*global angular*/
/* =============================================================================
Tickers panel directives
============================================================================= */
(function() { "use strict";
var app = angular.module('tickersPanelDirectives', [])
@leongaban
leongaban / tickers-panel
Created May 1, 2015 20:34
tickers-panel
<section class="panel tickers-panel">
<header class="quick-find">
<ul>
<li ng-class="{'active':tickersAll}"
ng-click="tickersAll = true; getTickers('all')">All</li>
<li ng-class="{'active':!tickersAll}"
ng-click="tickersAll = false; getTickers('port')">Port</li>
<li><div class="quick-search-ico"></div></li>
</ul>
@leongaban
leongaban / keyCodes
Created May 8, 2015 16:56
Key value pairs for keyCodes
var keys = [
{ k: 48, v: '0' },
{ k: 49, v: '1' },
{ k: 50, v: '2' },
{ k: 51, v: '3' },
{ k: 52, v: '4' },
{ k: 53, v: '5' },
{ k: 54, v: '6' },
{ k: 55, v: '7' },
{ k: 56, v: '8' },
/*global angular*/
/* =============================================================================
Scope factory | stores and retrieves $scopes
============================================================================= */
(function() { "use strict";
var app = angular.module('scopeFactory', [])
@leongaban
leongaban / app.js
Last active August 29, 2015 14:22
temp app.js
/*global angular*/
/** ============================================================================
----------------------------------------------------------------------------- */
/**
* Main TickerTags Dashboard App module
* @namespace Controller
* @desc Injects all modules and controls the $rootScope
* @summary "Connecting trending social content to investable companies."
* @copyright TickerTags 2015
@leongaban
leongaban / tagsHoverDirective.js
Created June 30, 2015 20:21
tagsHoverDirective
function directive () {
var directive = {
template :
'<div class="tags-hover-container" ng-show="tgh.tag.tagsHoverDisplay"> ' +
'<div class="tag-info-padding"> ' +
'<div class="tweets-direction" ng-hide="!tgh.tag.quantity"> ' +
'<div ng-hide="tgh.tag.length"> ' +
'<div ng-class="{"green-up": tgh.tag.direction == "positive", ' +
'"red-down": tgh.tag.direction == "negative", ' +
'"" : tgh.tag.direction == "stagnant"}"> ' +
@leongaban
leongaban / gist:b28041b258e010815e6e
Created July 9, 2015 22:06
getTickersFactory.js
/*global angular*/
////////////////////////////////////////////////////////////////////////////////
/**
* @name getTickersFactory
* @namespace Factories
* @desc Pulls the tickers list needed (Portfolio / Searched)
*/
(function() {
'use strict';
@leongaban
leongaban / HighChartsDirective.js
Last active August 29, 2015 14:26
HighChartsDirective.js
/*global angular*/
////////////////////////////////////////////////////////////////////////////////
/**
* @name highChart
* @namespace Directive
* @desc Displays our custom HighCharts chart
*/
(function() { "use strict";
@leongaban
leongaban / formatData.js
Created October 2, 2015 16:36
formatData
// If tags, GET tag volume data:
if (tags.length > 0) {
console.log('tags.length: ',tags.length);
for (var i=0; i<tags.length; i++) {
var loopStep = i;
rawTagData = [];
GetTweetVolFactory.returnTweetVol(tags[i].term_id, limit_range)