Skip to content

Instantly share code, notes, and snippets.

View vatshat's full-sized avatar

Thabile vatshat

View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 10, 2024 06:00
set -e, -u, -o, -x pipefail explanation
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 15, 2024 09:41
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@rajvansia
rajvansia / .block
Last active September 1, 2022 06:31
Scatterplot with brush d3 v4
license: gpl-3.0
@d3noob
d3noob / .block
Last active November 3, 2023 13:51
Simple Difference Chart
license: mit
@revolunet
revolunet / python-es6-comparison.md
Last active April 22, 2024 19:22
# Python VS JavaScript ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@bryanjswift
bryanjswift / abbreviated-unbound.conf
Last active September 19, 2022 05:02
Unbound (http://unbound.net/) configuration for local network device testing.
# The server clause sets the main parameters.
server:
# Allow network connections outside of localhost
interface: 0.0.0.0
# Don't automatically run in the background because I want to be able to kill it without hunting a pid
do-daemonize: no
# TODO: Change this to your network range, like `192.168.0.0/16 allow`
access-control: 10.0.0.0/16 allow
# TODO: Change this to your username, or whatever user you want to run/own the `unbound` process
username: "bryanjswift"
@nicolashery
nicolashery / elasticsearch.md
Last active December 30, 2023 19:03
Elasticsearch: updating the mappings and settings of an existing index

Elasticsearch: updating the mappings and settings of an existing index

Note: This was written using elasticsearch 0.9.

Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:

$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
  "_id": 1,
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git