Skip to content

Instantly share code, notes, and snippets.

View Redsandro's full-sized avatar

Redsandro Redsandro

View GitHub Profile
@Redsandro
Redsandro / controllers.application.js
Created June 17, 2019 15:54 — forked from lolmaus/controllers.application.js
ember-bootstrap + ember-autoresize
import Ember from 'ember';
export default Ember.Controller.extend({
appName: "Ember\nTwiddle",
});
import Ember from 'ember';
import { Promise } from 'rsvp'
export default Ember.Controller.extend({
appName: 'Template Numbers',
someBool: true,
init() {
this._super(...arguments)
this.send('fakeCallback')
@Redsandro
Redsandro / test_2mb.xml
Created October 12, 2015 22:17
2MB test XML file
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<spocosy version="1.0" responsetime="2011-03-15 13:53:12" exec="0.171">
<query-response requestid="" service="objectquery">
<sport name="Soccer" enetSportCode="s" del="no" n="1" ut="2009-12-29 15:36:24" id="1">
<tournament_template name="England 1" sportFK="1" gender="male" enetID="0" del="no" n="0" ut="2009-12-29 16:31:33" id="47">
<tournament name="2010/2011" tournament_templateFK="47" enetSeasonID="55" del="no" locked="none" n="0" ut="2010-06-17 10:14:31" id="5261">
<tournament_stage name="Premier League" tournamentFK="5261" countryFK="2" gender="male" enetID="4" startdate="2010-08-14" enddate="2011-05-22" del="no" locked="none" n="42" ut="2011-01-19 11:15:29" id="820745">
<properties>
<property object="tournament_stage" objectFK="820745" type="metadata" name="International" value="no" del="no" n="0" ut="2010-07-28 08:58:34" id="10533355" />
<property object="tournament_stage" objectFK="820745" type
@Redsandro
Redsandro / index.js
Last active October 12, 2015 12:53
Node.js xml to json parsers benchmark thingie
/*
* Benchmarking xml to json parsers
* @author Sander AKA Redsandro (http://www.Redsandro.com)
*/
var path = require('path');
var util = require('util');
var fs = require('fs');
var q = require('q');
q.longStackSuppor = true;
@Redsandro
Redsandro / gist:5473335
Created April 27, 2013 14:30
jQuery plugin - Turn raw JSON code into formatted, indented, color-coded collapsible code.
/*
* Collapsible JSON Formatter - Formatter and colorer of raw JSON code
*
* jQuery Json Formatter plugin v0.1.3
*
* Usage
* -----
*
* $('#target').jsonFormat('#source'); // or
* $('#target').jsonFormat('#source', {options override defaults}); // see jf.config
@Redsandro
Redsandro / json2xml.js
Created May 31, 2012 11:11 — forked from mediaupstream/json2xml.js
json2xml NodeJS Module - Convert an xml2js JSON object back to XML
/**
* json2xml NodeJS Module - Convert an xml2js JSON object back to XML
*
* Redsandro - changed into requirable
*
* @author Derek Anderson
* @copyright 2011 Media Upstream
* @license MIT License
* @url https://gist.github.com/1495793
*