Skip to content

Instantly share code, notes, and snippets.


James Santos sydcanem

View GitHub Profile
sydcanem / launch.json
Created Feb 23, 2018
VSCode Launch config for React SSR
View launch.json
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit:
"version": "0.2.0",
"configurations": [
"type": "chrome",
"request": "launch",
"name": "Chrome",
sydcanem / main.go
Created Jan 7, 2018 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (

Keybase proof

I hereby claim:

  • I am sydcanem on github.
  • I am sydcanem ( on keybase.
  • I have a public key ASDreDHKszuBzoPCDK7GhN8pcHPOiOColl5NSpwJ0Z2qBAo

To claim this, I am signing this object:

sydcanem / consul.service
Created Dec 18, 2015 — forked from yunano/consul.service
View consul.service
Description=consul agent
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d
sydcanem /
Created Nov 9, 2015 — forked from DanHerbert/
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:

$ npm update npm -g
sydcanem /
Last active Sep 22, 2015
Git install from source on Centos7
sudo yum groupinstall "Development Tools"
sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel curl-devel
wget -O git.tar.gz
tar -zvf git.tar.gz
cd git-*
make configure
./configure --prefix=/usr/local
sudo make install
View Nginx expires.conf
# Expire rules for static content
# cache.appcache, your document html and data
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
# access_log logs/static.log; # I don't usually include a static log
# Feed
location ~* \.(?:rss|atom)$ {
sydcanem / Nginx gzip.conf
Last active Apr 18, 2020
Gzip configuration for Nginx
View Nginx gzip.conf
#Enable Gzip compressed.
gzip on;
# Enable compression both for HTTP/1.0 and HTTP/1.1.
gzip_http_version 1.1;
# Compression level (1-9).
# 5 is a perfect compromise between size and cpu usage, offering about
# 75% reduction for most ascii files (almost identical to level 9).
gzip_comp_level 5;

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit

Mac Homebrew (RVM/MySQL/Redis) setup

Follow the steps below to setup a local development environment:


Recommended to download latest XQuartz


You can’t perform that action at this time.