Skip to content

Instantly share code, notes, and snippets.

Avatar
💅
startuppin'

Ricardo Torres rictorres

💅
startuppin'
View GitHub Profile
@rictorres
rictorres / gist:ca9168b5b52dc6db002f
Last active Sep 18, 2015 — forked from wetzler/gist:4478332
Kickfolio's (minified) code to embed Keen IO charts in their user dashboards. They have 3 line charts (last 7 days, last 24 hours, and last 4 weeks) which show the number of user "connect" sessions for a given app (identified by the filter app.PublicKey). For more context, see this blog post: http://blog.keen.io/post/39950174904/kickfolio-uses-k…
View gist:ca9168b5b52dc6db002f
Keen.configure(window.ENV.keenProjectId,window.ENV.keenApiKey),
Keen.onChartsReady(function(){
var e=new Keen.Series("connect",{
analysisType:"count",
timeframe:"last_7_days",
interval:"daily"
}),
t=new Keen.Series("connect",{
@rictorres
rictorres / maintenance-mode.conf
Created Sep 11, 2015
nginx maintenance mode
View maintenance-mode.conf
server {
listen 80;
server_name mysite.com;
root /var/www/mysite.com/;
location / {
if (-f $document_root/maintenance.html) {
return 503;
}
... # the rest of your config goes here
@rictorres
rictorres / vps-test-dd.md
Last active Mar 2, 2020
VPS performance tests
View vps-test-dd.md

Using dd

RunAbove Sandbox [ra]

  • 1 core / 2 GB RAM / 20 GB SSD

EC2 Micro [ec]

  • 1 core / 1 GB RAM / 8 GB

Digital Ocean [do]

  • 1 core / 512 MB RAM / 20 GB SSD
@rictorres
rictorres / angular-material.md
Last active Aug 29, 2015
List of Angular Material changes (breaking/features) since v0.8.3
View angular-material.md

0.9.0 (2015-05-04)

Features

  • autocomplete: adds support for messages to be displayed when no results are found (e057e271, closes #2574, #1525)

Breaking Changes

  • styles: removes global line-height and font-size from html and body (666e3311)
  • icons: namespaces built-in icons (539ec5e3)
View keybase.md

Keybase proof

I hereby claim:

  • I am rictorres on github.
  • I am rictorres (https://keybase.io/rictorres) on keybase.
  • I have a public key whose fingerprint is 353B A4A8 924A 2B4C A650 06B5 9684 8B0B FFC7 C82D

To claim this, I am signing this object:

View iojs-may-1st-pt_BR.md

io.js Semana de 1 de Maio

Release candidate do io.js 2.0, atualizações da comunidade e eventos

Release candidate do io.js 2.0

Essa semana tivemos um lançamento nightly v2.0, changelog completo poderá ser encontrado em breve no GitHub.

Atualizações da Comunidade

View webp-detect.js
function testWepP(callback) {
var webP = new Image();
webP.src = 'data:image/webp;base64,UklGRi4AAABXRUJQVlA4TCEAAAAvAUAAEB8wAiMw' +
'AgSSNtse/cXjxyCCmrYNWPwmHRH9jwMA';
webP.onload = webP.onerror = function () {
callback(webP.height === 2);
};
};
testWebP(function(supported) {
View mysql-es6.js
'use strict';
const mysql = require('mysql');
const Prom = require('bluebird');
Prom.promisifyAll(require('mysql/lib/Connection').prototype);
Prom.promisifyAll(require('mysql/lib/Pool').prototype);
let pool = mysql.createPool({
host: 'localhost',
View vector-install.md

How to Install Vector on Ubuntu 14

Vector is an on-host performance monitoring framework which exposes hand picked high resolution metrics to every engineer’s browser. More here.

Host machine

PCP Requirements

Vector requires PCP to collect data.

pkg-config

View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048