Top HN posts
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Jest Current File", | |
"runtimeExecutable": "sh", // <-- The important bit! | |
"program": "node_modules/.bin/jest", | |
"args": ["${relativeFile}"], |
import axios from 'axios' | |
import React from 'react' | |
import { | |
Stack, | |
Thumbnail, | |
TextStyle, | |
Card, | |
Pagination, | |
Spinner, | |
TextContainer |
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
-
Run the following in powershell as admin
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
-
Install a distro (ex: Ubuntu 18.04 LTS - https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)
-
Open your distro you installed via the start menu, let it setup
-
Update and upgrade
sudo apt-get update
#!/bin/bash | |
#### Restart Bluetooth | |
if [ "$1" == "resetBT" ] ; then | |
sudo rfkill block bluetooth && sleep 0.1 && sudo rfkill unblock bluetooth; | |
exit; | |
fi; | |
#### Toggle listen/speak | |
if [ "$1" == "" -o "$1" == "toggle" ] ; then |
const updateCountryFetch = async (countryId, happinessFactor, population) => { | |
const query = JSON.stringify({ | |
query: `mutation { | |
updateCountry( | |
id: "${countryId}" | |
happinessFactor: ${happinessFactor} | |
population: ${population}) { id } | |
} | |
` | |
}); |
This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.
Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.
Generate a Certificate Authority:
In the last few years, the number of programmers concerned about writing structured commit messages have dramatically grown. As exposed by Tim Pope in article readable commit messages are easy to follow when looking through the project history. Moreover the AngularJS contributing guides introduced conventions that can be used by automation tools to automatically generate useful documentation, or by developers during debugging process.
This document borrows some concepts, conventions and even text mainly from these two sources, extending them in order to provide a sensible guideline for writing commit messages.