Skip to content

Instantly share code, notes, and snippets.

@nonononogin
nonononogin / PY0101EN-1-2-Strings.ipynb
Created Mar 2, 2021
Created on Skills Network Labs
View PY0101EN-1-2-Strings.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@steveruizok
steveruizok / getOuterTangents.ts
Created Mar 2, 2021
Get outer tangents of two circles.
View getOuterTangents.ts
function getOuterTangents(
x0: number,
y0: number,
r0: number,
x1: number,
y1: number,
r1: number
) {
const dx = x1 - x0,
dy = y1 - y0,
@nonononogin
nonononogin / PY0101EN-1-2-Strings.ipynb
Created Mar 2, 2021
Created on Skills Network Labs
View PY0101EN-1-2-Strings.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View urlFileDownload
def downloadFile(url,path=''):
abspath=os.path.abspath(path)
urllib.request.urlretrieve(url,abspath)
@dgk
dgk / jq-cheetsheet.md
Created Mar 2, 2021 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet
View jq-cheetsheet.md

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

View elasticsearch7
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/zp3d30dzw5j228zd98v1svl343h5x0qk-elasticsearch-7.5.1-linux-x86_64.tar.gz
source root is elasticsearch-7.5.1
setting SOURCE_DATE_EPOCH to timestamp 1576537283 of file elasticsearch-7.5.1/lib/tools/security-cli/elasticsearch-security-cli-7.5.1.jar
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/cy6jji68q4cisfp3jdlgxymwxg5fivrj-es-home-6.x.patch
patching file bin/elasticsearch-env
@nix { "action": "setPhase", "phase": "configurePhase" }
@serveba
serveba / pp_struct.go
Created Mar 2, 2021
golang struct pretty print
View pp_struct.go
# someStruct is a struct with other structs as fields
# printf will show all the tree struct on a human friendly format
prettyString, _ := json.MarshalIndent(someStruct, "", " ")
fmt.Printf("ModelType: %s\n", prettyString)
View elasticsearch
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/6x6qrkvb2xj4pzxzm35y2lg6qqzziklq-elasticsearch-6.8.3.tar.gz
source root is elasticsearch-6.8.3
setting SOURCE_DATE_EPOCH to timestamp 1567105741 of file elasticsearch-6.8.3/lib/tools/security-cli/elasticsearch-security-cli-6.8.3.jar
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/cy6jji68q4cisfp3jdlgxymwxg5fivrj-es-home-6.x.patch
patching file bin/elasticsearch-env
@nix { "action": "setPhase", "phase": "configurePhase" }
@r-rmcgibbo
r-rmcgibbo / elasticsearch
Created Mar 2, 2021
system: aarch64-linux | build_time: 3 seconds | https://github.com/NixOS/nixpkgs/pull/114830
View elasticsearch
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/6x6qrkvb2xj4pzxzm35y2lg6qqzziklq-elasticsearch-6.8.3.tar.gz
source root is elasticsearch-6.8.3
setting SOURCE_DATE_EPOCH to timestamp 1567105741 of file elasticsearch-6.8.3/lib/tools/security-cli/elasticsearch-security-cli-6.8.3.jar
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/cy6jji68q4cisfp3jdlgxymwxg5fivrj-es-home-6.x.patch
patching file bin/elasticsearch-env
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
@sahil-jindal
sahil-jindal / RE_to_Grammar_Algorithm.md
Created Mar 2, 2021 — forked from santanuchakrabarti/RE_to_Grammar_Algorithm.md
An algorithm to generate a Regular Grammar from a Regular Expression
View RE_to_Grammar_Algorithm.md