Skip to content

Instantly share code, notes, and snippets.

View sydcanem's full-sized avatar
Working from home

James Santos sydcanem

Working from home
View GitHub Profile
sydcanem / List.js
Last active September 15, 2020 11:04
import React from "react";
import Checkbox from "./Checkbox";
import { status } from "./constants";
export default function List(props) {
const { items } = props;
return (
{ => {
"id": 1,
"name": "Table",
"items": [
{ "id": 3, "name": "Bar Table" },
{ "id": 4, "name": "Dining" },
{ "id": 5, "name": "Coffee Table" }
sydcanem / timer.js
Created September 6, 2020 07:11
Promise Timer
function timeout(ms, action) {
const timer = new Promise((resolve, reject) => {
const id = setTimeout(() => {
reject(`Timed out in ${ms}ms.`);
}, ms);
return Promise.race([timer, action]);
sydcanem /
Last active September 6, 2020 07:31
Express ES6 Boilerplate

Express Boilerplate in ES6

Because it's hard to memorize boilerplates...

sydcanem / launch.json
Created February 23, 2018 18:58
VSCode Launch config for React SSR
// 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 January 7, 2018 22:03 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
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 December 18, 2015 07:35 — forked from yunano/consul.service
Description=consul agent
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d
sydcanem /
Created November 9, 2015 14:25 — 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 September 22, 2015 06:24
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