Skip to content

Instantly share code, notes, and snippets.

Alejandro García Iglesias alejandroiglesias

View GitHub Profile
View tooltips-popovers.css
.tooltip {
position: absolute;
z-index: 1030;
display: block;
visibility: visible;
font-size: 11px;
line-height: 1.4;
opacity: 0;
filter: alpha(opacity=0);
}
View tooltips.css
/* Tooltips */
.has-tip {
border-bottom: dotted 1px #cccccc;
cursor: help;
font-weight: bold;
color: #333333; }
.has-tip:hover, .has-tip:focus {
border-bottom: dotted 1px #196177;
color: #2ba6cb; }
.has-tip.tip-left, .has-tip.tip-right {
View gist:6168183
angular
.module('api', ['$http'])
.constant('API_URL', '/api/')
.factory('getInitializationData', function () {
//since $http.get returns a promise,
//and promise.then() also returns a promise
//that resolves to whatever value is returned in it's
//callback argument, we can return that.
return $http
.get(API_URL + 'action/initalize')
View js_error_tracker.py
from random import shuffle
debuggify = '''
<script type="text/javaScript" src="https://cdn.debuggify.net/js/a4f458fc1c74cf2b60f0909da8531164/debuggify.logger.http.js"></script>
'''
qbaka = '''
<script type="text/javascript">
(function(a,c){a.__qbaka_eh=a.onerror;a.__qbaka_reports=[];a.onerror=function(){a.__qbaka_reports.push(arguments);if(a.__qbaka_eh)try{a.__qbaka_eh.apply(a,arguments)}catch(b){}};a.onerror.qbaka=1;a.qbaka={report:function(){a.__qbaka_reports.push([arguments, new Error()]);},customParams:{},set:function(a,b){qbaka.customParams[a]=b},exec:function(a){try{a()}catch(b){qbaka.reportException(b)}},reportException:function(){}};var b=c.createElement("script"),e=c.getElementsByTagName("script")[0],d=function(){e.parentNode.insertBefore(b,e)};b.type="text/javascript";b.async=!0;b.src="//cdn.qbaka.net/reporting.js";"[object Opera]"==a.opera?c.addEventListener("DOMContentLoaded",d):d();qbaka.key="a72f5cc63c961ae53e177e4ca071beb5"})(window,document);qbaka.options={autoStacktrace:1,trackEvents:1};
</
@alejandroiglesias
alejandroiglesias / gist:5514179
Last active Dec 16, 2015
First file is my RequireJS config. Second, is the main require() call.
View gist:5514179
{
name: 'components/almond/almond',
include: 'lib/emform',
out: 'dist/emform.js',
optimize: 'uglify2',
useStrict: true,
shim: {
'handlebars': {
exports: 'Handlebars'
}
View gist:5469600
{
"bitwise": false,
"camelcase": false,
"curly": false,
"eqeqeq": false,
"forin": false,
"immed": false,
"indent": false,
"latedef": true,
"newcap": false,
View gist:5391977
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
View gist:5391546
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
View gist:5340740
/**
* Dropdown
*/
$(document)
.on('click', '.dropdown p, .dropdown .btn', function (event) {
$(event.target)
.closest('.btn')
.attr('tabindex', '1') // Gives the element a tabindex so it can be focused and blurred afterwards.
.trigger('focus')
.next().toggle();
View gist:5215983
var Slider = function (options) {
var defaults = {
horizontal: false,
vertical: true,
y: 0.5,
animationCallback: function (x, y) {
var frame = Math.ceil(y * 35);
this.wrapper.parentNode.className = 'snicker-blue ' + 'snicker-tiptop-' + frame;
}
};
You can’t perform that action at this time.