Skip to content

Instantly share code, notes, and snippets.

View tcorral's full-sized avatar

Tomás Corral Casas tcorral

  • Softonic.com
  • Barcelona
View GitHub Profile
!function(e){function r(e,r,o){return 4===arguments.length?t.apply(this,arguments):void n(e,{declarative:!0,deps:r,declare:o})}function t(e,r,t,o){n(e,{declarative:!1,deps:r,executingRequire:t,execute:o})}function n(e,r){r.name=e,e in v||(v[e]=r),r.normalizedDeps=r.deps}function o(e,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==g.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var t=0,n=e.normalizedDeps.length;n>t;t++){var a=e.normalizedDeps[t],u=v[a];if(u&&!u.evaluated){var d=e.groupIndex+(u.declarative!=e.declarative);if(void 0===u.groupIndex||u.groupIndex<d){if(void 0!==u.groupIndex&&(r[u.groupIndex].splice(g.call(r[u.groupIndex],u),1),0==r[u.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");u.groupIndex=d}o(u,r)}}}}function a(e){var r=v[e];r.groupIndex=0;var t=[];o(r,t);for(var n=!!r.declarative==t.length%2,a=t.length-1;a>=0;a--){for(var u=t[a],i=0;i<u.length;i++){var s=u[i];n?d(s):l(s)}n=!n}}function u(e){return y[e]||(y[e]={name:e,dependencies:[],exports:{},importers:[]})}f
/* Original code in ES6 for distribution tests using jspm and webpack-dev-server*/
import $ from 'jquery';
console.log('jQuery version:' + $.fn.jquery);
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
!function(e){function r(e,r,o){return 4===arguments.length?t.apply(this,arguments):void n(e,{declarative:!0,deps:r,declare:o})}function t(e,r,t,o){n(e,{declarative:!1,deps:r,executingRequire:t,execute:o})}function n(e,r){r.name=e,e in v||(v[e]=r),r.normalizedDeps=r.deps}function o(e,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==g.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var t=0,n=e.normalizedDeps.length;n>t;t++){var a=e.normalizedDeps[t],u=v[a];if(u&&!u.evaluated){var d=e.groupIndex+(u.declarative!=e.declarative);if(void 0===u.groupIndex||u.groupIndex<d){if(void 0!==u.groupIndex&&(r[u.groupIndex].splice(g.call(r[u.groupIndex],u),1),0==r[u.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");u.groupIndex=d}o(u,r)}}}}function a(e){var r=v[e];r.groupIndex=0;var t=[];o(r,t);for(var n=!!r.declarative==t.length%2,a=t.length-1;a>=0;a--){for(var u=t[a],i=0;i<u.length;i++){var s=u[i];n?d(s):l(s)}n=!n}}function u(e){return y[e]||(y[e]={name:e,dependencies:[],exports:{},importers:[]})}f
!function(e){function r(e,r,o){return 4===arguments.length?t.apply(this,arguments):void n(e,{declarative:!0,deps:r,declare:o})}function t(e,r,t,o){n(e,{declarative:!1,deps:r,executingRequire:t,execute:o})}function n(e,r){r.name=e,e in v||(v[e]=r),r.normalizedDeps=r.deps}function o(e,r){if(r[e.groupIndex]=r[e.groupIndex]||[],-1==g.call(r[e.groupIndex],e)){r[e.groupIndex].push(e);for(var t=0,n=e.normalizedDeps.length;n>t;t++){var a=e.normalizedDeps[t],u=v[a];if(u&&!u.evaluated){var d=e.groupIndex+(u.declarative!=e.declarative);if(void 0===u.groupIndex||u.groupIndex<d){if(void 0!==u.groupIndex&&(r[u.groupIndex].splice(g.call(r[u.groupIndex],u),1),0==r[u.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");u.groupIndex=d}o(u,r)}}}}function a(e){var r=v[e];r.groupIndex=0;var t=[];o(r,t);for(var n=!!r.declarative==t.length%2,a=t.length-1;a>=0;a--){for(var u=t[a],i=0;i<u.length;i++){var s=u[i];n?d(s):l(s)}n=!n}}function u(e){return y[e]||(y[e]={name:e,dependencies:[],exports:{},importers:[]})}f
@tcorral
tcorral / gist:e51315a245ab461c1dcf
Created June 30, 2015 19:28
Error on install setup
Installing Node
install.sh: line 33: /Users/test/.nvm/nvm.sh: No such file or directory
install.sh: line 34: /Users/test/.nvm/nvm.sh: No such file or directory
... done
Installing Brew
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
... done
Installing Maven and Java
window.onerror = function(message, url, linenumber) {
try{
_gaq.push(['_trackEvent', 'Error', 'JS', JSON.stringify({'refurl': document.location.href, 'url': url.replace(/\?\d+$/, ''), 'line': linenumber, 'message': message})]);
} catch (e) {}
return true;
};
var isPortTaken = function(PORT, callback) {
var net = require('net')
var tester = net.createServer()
tester.once('error', function (err) {
if (err.code == 'EADDRINUSE') {
callback(null, true)
} else {
callback(err)
}
})
@tcorral
tcorral / data.js
Created January 23, 2013 10:35
Data Namespace to use in Hydra workshop
(function(ns)
{
'use strict';
var Data: {};
Data.getFilteredDataById = function ( oData, nId ) {
var aEvents = oData.events.slice( 0 ),
oEvent = aEvents.shift();
while ( oEvent ) {
if ( oEvent.id === nId ) {
return oEvent;
@tcorral
tcorral / url.js
Created January 23, 2013 10:33
URL namespace to use in Hydra workshops
(function(ns)
{
'use strict';
var URL = {};
URL.getDataBaseUrl = function()
{
return 'http://gist.github.com/raw/4604119/418e5cfdb9bbcac2d1f6b1d32bb91a5f048777e7/gistfile1.json';
};
// Expose to the namespace.
ns.url = URL;