Skip to content

Instantly share code, notes, and snippets.

View luizbafilho's full-sized avatar

Luiz Filho luizbafilho

View GitHub Profile
@luizbafilho
luizbafilho / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
@luizbafilho
luizbafilho / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
@luizbafilho
luizbafilho / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@luizbafilho
luizbafilho / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
# encoding: utf-8
site 'http://community.opscode.com/api/v1'
cookbook "apt"
cookbook "nodejs", {:github=>"mdxp/nodejs-cookbook"}
cookbook "mysql", {}
cookbook "vim", {}
cookbook "build-essential", {}
cookbook "rvm", {:github=>"fnichol/chef-rvm", :ref=>"v0.9.0"}
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
app.get('/', function(req, res){
res.send('<h1>Hello world</h1>');
});
io.on('connection', function(socket){
console.log('a user connected');
require 'rspec'
class Stats
def self.mean(array)
array.inject(:+) / array.size.to_f
end
def self.median(array)
mid = array.length / 2
sorted = array.sort
set-option -g default-shell /usr/local/bin/zsh
set -g default-terminal "screen-256color"
set -g repeat-time 125
set -g base-index 1 # count from 1
set-option -g allow-rename off
set -s escape-time 0
#Change prefix key to backtick (`)
unbind C-b
set-option -g prefix `
module Request
def get(url, payload: {}, headers: {})
headers = define_headers(headers)
execute(:get, url, payload, headers)
end
def post(url, payload: {}, headers: {})
headers = define_headers(headers)
execute(:post, url, payload, headers)
end