Skip to content

Instantly share code, notes, and snippets.

View zzarcon's full-sized avatar
🦍
Generating legacy code

Hector Zarco zzarcon

🦍
Generating legacy code
View GitHub Profile
@zzarcon
zzarcon / data.txt
Last active October 6, 2015 14:48
Samsung Galaxy S3 Component performance report
Resume: "Show view" took 16sec to load + initial fetching and app rendering
COMPONENT NAME | OCURRENCES | TOTAL TIME | AVERAGE
component:rt-icon 101 875 9
component:rt-arrow 4 228 57
component:rt-link-to 113 1785 16
component:rt-offer-slidedown 1 202 202
component:rt-user-avatar 19 1067 56
component:rt-input 4 153 38
{
target: "559a65636cc1ceefad000117",
traces: {
559a65636cc1ceefad000117: {
id: 1501,
sample_id: "559a65636cc1ceefad000117",
user_id: "2270751",
path: "LINESTRING (14.2936706542969 48.3098602294922, 14.2931604385376 48.3095512390137, 14.2930936813354 48.3095245361328, 14.2930459976196 48.3095054626465, 14.2929792404175 48.3094635009766, 14.2929191589355 48.3094024658203, 14.2928485870361 48.3093566894531, 14.2927770614624 48.3093185424805, 14.2926845550537 48.3093032836914, 14.292552947998 48.3092842102051, 14.2924461364746 48.3092613220215, 14.2922887802124 48.3091506958008, 14.2922258377075 48.3091011047363, 14.2921466827393 48.3090591430664, 14.2920589447021 48.309024810791, 14.2919750213623 48.3089714050293, 14.2918157577515 48.3088798522949, 14.2917490005493 48.308837890625, 14.2916784286499 48.3087921142578, 14.2914981842041 48.3087158203125, 14.2913036346436 48.3086433410644, 14.291223526001 48.3086204528809, 14.2911424636841 48.3086051940918, 14.2909755706787 48.3085632324219, 14.290885925293 48.30852
@zzarcon
zzarcon / curl
Created December 23, 2015 22:22
curl 'https://www.instagram.com/accounts/login/ajax/' -H 'Cookie: csrftoken=a93735bbc831ea62cb5cc4d4f42e50ad' -H 'X-Instagram-AJAX: 1' -H 'Referer: https://www.instagram.com/' -H 'X-CSRFToken: a93735bbc831ea62cb5cc4d4f42e50ad' -H 'X-Requested-With: XMLHttpRequest' --data 'username=zzarcon&password=11111' --compressed
@zzarcon
zzarcon / .bash_profile.sh
Created January 8, 2016 07:16
Show the version of any npm package from command line
moduleVersion() {
str=`cat $1/package.json | grep -i '"version"'`
echo $str
}
Ember.LinkView.reopen({
willRender() {
const route = this.attrs.params[0];
let params = this.attrs.params[1];
if (params instanceof Array) {
this.attrs.params = [].concat.apply([route], params);
}
return this._super(...arguments);
{
"words": ["foo", "bar"],
"quote": "A book about $1 that talks about $2"
}
function fetchBlob(uri, callback) {
var xhr = new XMLHttpRequest();
xhr.open('GET', uri, true);
xhr.setRequestHeader("X-Mashape-Key", config.mashapeKey);
xhr.responseType = 'arraybuffer';
xhr.onload = function(e) {
if (this.status == 200) {
var blob = this.response;
var a = 1;
var url = 'https://ronreiter-meme-generator.p.mashape.com/meme?meme=Baby+Godfather&font_size=50&font=Impact&top=Thanks+m&bottom=Later';
var headers = new Headers({'X-Mashape-Key': 'API_KEY'});
var options = {
method: 'GET',
headers: headers,
mode: 'cors',
cache: 'default'
};
var request = new Request(url);
@zzarcon
zzarcon / fibonacci.js
Created February 17, 2016 21:06
Javascript Fibonacci
function fibonacci(num) {
if (num <= 1) return 1;
return fibonacci(num - 1) + fibonacci(num - 2);
}