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
);
}
@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 {
@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);
}
}
@mattrc
mattrc / 0_reuse_code.js
Created August 24, 2014 02:43
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
{
"vars": {
"@gray-darker": "lighten(#000, 20%)",
"@gray-dark": "lighten(#000, 25%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 60%)",
"@gray-lighter": "lighten(#000, 90%)",
"@brand-primary": "#70b95c",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
@mattrc
mattrc / snippet.js
Created July 16, 2012 10:58 — forked from necolas/snippet.js
Optimised async loading of cross-domain scripts
/*
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/
* Better handling of scripts without supplied ids.
*
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function.
*/
(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],