Because it's hard to memorize boilerplates...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Checkbox from "./Checkbox"; | |
import { status } from "./constants"; | |
export default function List(props) { | |
const { items } = props; | |
return ( | |
<ul> | |
{items.map((item) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1, | |
"name": "Table", | |
"items": [ | |
{ "id": 3, "name": "Bar Table" }, | |
{ "id": 4, "name": "Dining" }, | |
{ "id": 5, "name": "Coffee Table" } | |
] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function timeout(ms, action) { | |
const timer = new Promise((resolve, reject) => { | |
const id = setTimeout(() => { | |
clearTimeout(id); | |
reject(`Timed out in ${ms}ms.`); | |
}, ms); | |
}); | |
return Promise.race([timer, action]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Chrome", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
I hereby claim:
- I am sydcanem on github.
- I am sydcanem (https://keybase.io/sydcanem) on keybase.
- I have a public key ASDreDHKszuBzoPCDK7GhN8pcHPOiOColl5NSpwJ0Z2qBAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=consul agent | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/consul | |
Environment=GOMAXPROCS=2 | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d |
If you just want to fix the issue quickly, scroll down to the "solution" section below.
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum groupinstall "Development Tools" | |
sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel curl-devel | |
wget https://github.com/git/git/archive/v2.5.1.tar.gz -O git.tar.gz | |
tar -zvf git.tar.gz | |
cd git-* | |
make configure | |
./configure --prefix=/usr/local | |
sudo make install |
NewerOlder