Skip to content

Instantly share code, notes, and snippets.

View mattrc's full-sized avatar

Matias Alibertti mattrc

View GitHub Profile
@mattrc
mattrc / providerCompose.js
Created May 7, 2019 12:04 — forked from stolinski/providerCompose.js
ProviderComposer
function ProviderComposer({ contexts, children }) {
return contexts.reduceRight(
(kids, parent) =>
React.cloneElement(parent, {
children: kids,
}),
children
);
}
Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
at io.swagger.codegen.examples.ExampleGenerator.resolvePropertyToExample(ExampleGenerator.java:113)
at io.swagger.codegen.examples.ExampleGenerator.resolveModelToExample(ExampleGenerator.java:204)
at io.swagger.codegen.examples.ExampleGenerator.resolvePropertyToExample(ExampleGenerator.java:163)
at io.swagger.codegen.examples.ExampleGenerator.generate(ExampleGenerator.java:49)
at io.swagger.codegen.DefaultCodegen.fromOperation(DefaultCodegen.java:2185)
at io.swagger.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:864)
at io.swagger.codegen.DefaultGenerator.processPaths(DefaultGenerator.java:791)
at io.swagger.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:418)
at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:730)
@mattrc
mattrc / typeOf.js
Created May 13, 2017 12:34
JavaScript typeOf function
'use strict';
function typeOf(obj) {
return Object.prototype.toString
.call(obj)
.slice(8, -1)
.toLowerCase();
}
console.log(typeOf(678));
@mattrc
mattrc / gist:26d8faacede6a04cc2cbc00fd8bd745c
Created February 2, 2017 09:37 — forked from learncodeacademy/gist:5850f394342a5bfdbfa4
SSH Basics - Getting started with Linux Server Administration

###SSH into a remote machine###

ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1

exit: exit ###Install Something###

#If it's a new server, update apt-get first thing
@mattrc
mattrc / index.html
Created August 16, 2016 13:27 — forked from anonymous/index.html
HINCHAS Iframe HINCHAS Iframe // source http://jsbin.com/huyute
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="HINCHAS Iframe">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>HINCHAS Iframe</title>
<style id="jsbin-css">
body,
html {
{
"created_at":"Fri Jun 10 17:34:06 +0000 2016",
"id":741322563511549953,
"id_str":"741322563511549953",
"text":"vamos la selecci\u00f3n #DiMaria7",
"truncated":false,
"entities":{
"hashtags":[
{
"text":"DiMaria7",
@mattrc
mattrc / UntilYouPayMe.js
Created June 5, 2016 14:56 — forked from juanbrujo/UntilYouPayMe.js
Use this JavaScript function to annoy your clients that insist in not paying you.
function randomErrors(){
var errorMessages = ['Unexpected Error!','Something happended, please try again'];
var randomMessage = errorMessages[Math.floor(Math.random() * errorMessages.length)];
var currentURL = (window.location != window.parent.location) ? document.referrer : document.location;
if (confirm( randomMessage )) {
window.location.reload(true);
} else {
window.location.reload(true);
}
}
<h1>Foo</h1>
@mattrc
mattrc / hsEntitiesSuggestedList.js
Created January 14, 2015 03:40
hsEntitiesSuggestedList
'use strict';
app.directive('hsEntitiesSuggestedList', function (FollowBtnService) {
// Helper fn to find DOM element by scope ID
function _getElementByScopeId(domCollection, id) {
return _.find(domCollection, function (domElement) {
return (angular.element(domElement).scope().entity.id === id);
});
}