Skip to content

Instantly share code, notes, and snippets.

@miketoth
miketoth / .eslintrc.js
Last active January 25, 2017 22:03 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
@miketoth
miketoth / hipchat-giphy
Last active December 7, 2017 20:50 — forked from snit-ram/hipchat-giphy
Giphy on hipchat (no integration needed)
(function () {
function giphy(word, callback) {
var xhr = new XMLHttpRequest();
var url = 'https://api.giphy.com/v1/gifs/translate?rating=pg-13&api_key=dc6zaTOxFJmzC&s=' + encodeURIComponent(word);
xhr.open('GET', url);
xhr.onreadystatechange = function(e) {
if(xhr.readyState === 4) {
var url = JSON.parse(e.target.responseText).data.images.fixed_height.url;
callback(url);
}