Skip to content

Instantly share code, notes, and snippets.

View matheuslc's full-sized avatar
🏠
Working from home

Matheus Carmo matheuslc

🏠
Working from home
View GitHub Profile
@matheuslc
matheuslc / smacss.md
Created May 20, 2014 14:33
A SMACSS guide

Categorias

Base

Define como objetos serão vistos por padrão. Um exemplo de base é um CSS Reset.

Layout

Blocos de seções de páginas, por exemplo, um header, um footer, um artigo e etc.

#BrazilJS 2014

Talks: Slides & Links

Day Talk Speaker Links
1 Why ServiceWorker may be the next big thing Renato Mangini TBP
1 Frontend at Scale - The Tumblr Story Chris Miller TBP
1 Intro to GFX: Raw WebGL Nick Desaulniers Slides
@matheuslc
matheuslc / has.js
Created August 29, 2014 17:23
A value have in array
var arr = ['foo', 'bar'];
Array.prototype.has = function(value) {
return this.indexOf(value) >= 0;
}
arr.has('foo'); // true
arr.has('bar'); // true
arr.has('baz'); // false
;(function(window, document, jQuery) {
/** Table sort
* @description Sort items
*/
/** Insertion Sort Data Structure
* @description Sort numbers
* @param items {array} Array with integers
@matheuslc
matheuslc / análisedeframeworks.md
Last active November 18, 2015 10:13
Análise de frameworks CSS [BETA]

Análise de Frameworks CSS

Tabela Comparativa

Framework Arquitetura de CSS Pré-processador Componentes Suporte (browsers) Suporte (comunidade) Curva de aprendizado Velocidade de desenvolvimento Qualidade de código Documentação Dependências Tamanho
Twitter Bootstrap OOCSS LESS/Sass Muitos IE8+ Excelente Média Excelente Ótima 8/10 jQuery 255kb
Zurb Foundation OOCSS Sass Muitos+ IE9+ Ótima Média Excelente Excelente 9/10 jQuery 174kb
Yahoo Purecss SMACSS - Poucos IE8+ Ótima Baixa Boa Execelente 9/10 - 74kb
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@matheuslc
matheuslc / gist:dfffabdcdd894e349d60
Created March 5, 2016 00:10
DashboardController.php
/**
* @Route(
* "/e/{schoolId}/",
* requirements={"schoolId" = "\d+"},
* name="school_redirect"
* )
* @Method({"GET"})
*/
public function schoolRedirectAction(Request $request, $schoolId)
{
@matheuslc
matheuslc / webpack.config.js
Last active May 8, 2016 23:01
webpack.config.js
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
app: path.resolve(__dirname, 'src/js/main.js')
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'app.js',
Endpoints que estão demorando para responder em redes grandes:
- Polls - 18.43s
/v3/users/1/polls?expired=false&voted=false
- Widget de grupos - 6.09s
/v3/users/me/groups?status=STATUS_RESOURCE_PENDING
- Chat - 13.88s
https://p-api.socialbase.com.br/v3/chat
@matheuslc
matheuslc / applicationError.js
Created October 25, 2016 13:25
Application Error
{
"error": "An exception occurred while executing 'UPDATE integration SET credentials = ?, refresh_token = ?, email = ? WHERE id = ?' with params [\"{\\\"access_token\\\":\\\"ya29.Ci-HA4IZAppr0aGqRdoOFMdz1uSpflAuowsKFB0ZxJvOcjWEqeFWSB4S3tOvrmm4vQ\\\",\\\"token_type\\\":\\\"Bearer\\\",\\\"expires_in\\\":3600,\\\"refresh_token\\\":\\\"1\\\\\\/mF2dxV7c_PiBg7Y5_7zEGfWENiZuck7lBC0nyj3rbyhUXHStNhZFB0IaY_THO7GL\\\",\\\"id_token\\\":\\\"eyJhbGciOiJSUzI1NiIsImtpZCI6ImFmNzNmMGViYWM4ZjBmYzBiYzBiNTk3ODVlYmEzN2Y0OWIwNGFmNTMifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhdF9oYXNoIjoiLTN2aWZ5U0FTQUNvcmx2bnJWTFZVdyIsImF1ZCI6Ijk3MTE5MDc3MTQzOC01ampxN2UyN2I0ZXM0Y2ZwNGlwazQwNm8xZnZyZm9uMS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInN1YiI6IjExNTk4MTQ1NDAzODMxNTk0MTMyNSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhenAiOiI5NzExOTA3NzE0MzgtNWpqcTdlMjdiNGVzNGNmcDRpcGs0MDZvMWZ2cmZvbjEuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJoZCI6InNvY2lhbGJhc2UuY29tLmJyIiwiZW1haWwiOiJtYXRoZXVzLmNhcm1vQHNvY2lhbGJhc2UuY29tLmJyIiwiaWF0IjoxNDc3NDAxNzM0LCJleHAi