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 / goGetPrivate.md
Created June 23, 2023 21:18 — forked from StevenACoffman/goGetPrivate.md
How to `go get` private repos using SSH key auth instead of password auth.

Set GOPRIVATE to match your github organization

Cloning the repo using one of the below techniques should correctly but you may still getting an unrecognized import error.

As it stands for Go v1.13, I found in the doc that we should use the GOPRIVATE variable like so:

GOPRIVATE=github.com/ORGANISATION_OR_USER_NAME go get -u -f github.com/ORGANISATION_OR_USER_NAME/REPO_NAME

The 'go env -w' command (see 'go help env') can be used to set these variables for future go command invocations.

How to go get private repos using SSH key auth instead of password auth.

@matheuslc
matheuslc / increase-swap.sh
Created June 1, 2017 20:47
How to increase your swap memory
$ docker-machine ssh
$ export SWAPFILE=/mnt/sda1/swapfile
$ sudo dd if=/dev/zero of=$SWAPFILE bs=1G count=4
$ sudo mkswap $SWAPFILE
$ sudo chmod 600 $SWAPFILE
$ sudo swapon $SWAPFILE
version: '2'
services:
api:
build: ./api
ports:
- "localhost:3000:3000"
volumes:
- /Users/matheuslc/healfies/healfies_api:/usr/src/api
links:
@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
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 / 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',
@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)
{
# -*- 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 / 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
;(function(window, document, jQuery) {
/** Table sort
* @description Sort items
*/
/** Insertion Sort Data Structure
* @description Sort numbers
* @param items {array} Array with integers