Skip to content

Instantly share code, notes, and snippets.

View marcelaraujo's full-sized avatar

Marcel Araujo marcelaraujo

View GitHub Profile
@marcelaraujo
marcelaraujo / test.html
Last active August 29, 2015 14:01
xmlrequest api bug at Chrome
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
var httpRequest;
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
#!/usr/bin/env python
# Clone or update all a user's gists
# curl -ks https://gist.githubusercontent.com/fedir/5466075/raw/gist-backup.py | USER=fedir python
# USER=fedir python gist-backup.py
import json
import urllib
from subprocess import call
from urllib import urlopen
import os
@therebelrobot
therebelrobot / Request.node.js
Created June 23, 2014 23:55
Node.js function for consuming API
var http = require('http');
var options = {
hostname: 'api.github.com',
path: '/api/endpoint',
headers: {
'User-Agent': 'UserAgentHere',
'Accept': 'application/json'
}
};
var request = http.request(options, function(response) {
(function(){
'use strict';
function PubSubService(){
/**
* based on: http://davidwalsh.name/pubsub-javascript
*/
var topics = {};
//----------------------------------------------------------------------------
@guptag
guptag / React Class Template
Last active November 17, 2016 12:02
ReactJS
// React Class template with inlined documentation from
// http://facebook.github.io/react/docs/component-specs.html
var component = React.createClass({
/***** Core Methods *****/
render: function () {
// Returns ReactComponent
@wa0x6e
wa0x6e / README.md
Last active March 27, 2017 12:36
Memcached widget for Shopify's Dashing dashboard

Memcached widget for Dashing

Description

Memcached dashing widget to display the number of connected clients to one or more memcached servers, as well as the instance memory usage.

Dependencies

@wa0x6e
wa0x6e / README.md
Last active March 27, 2017 12:36
Varnish cache hit ratio widget for Shopify's Dashing dashboard

Varnish Cache hit ratio widget for Dashing

Description

Varnish Dashing widget to display the ratio of cache hit/miss.

Dependencies

@petehamilton
petehamilton / metric_apps.md
Last active May 22, 2017 19:14
Useful Metric Dashboard Research Links

Dashboards

Charting

anonymous
anonymous / App.js
Created July 6, 2017 18:36
import React, { Component } from 'react';
import Header from './components/Header';
import Body from './components/Body';
class App extends Component {
constructor(props){
super(props);
this.state = {dropdownShow : false};
@garmjs
garmjs / ReactRouterv4 CodeSpliting.js
Last active July 31, 2017 12:37 — forked from acdlite/app.js
Quick and dirty code splitting with React Router v4
import React from 'react'
import { Loading } from '../components/loading'
function asyncComponent (getComponent) {
return class AsyncComponent extends React.Component {
static Component = null
mounted = false
state = {
Component: AsyncComponent.Component