Output of dinamic inventory.
> ./hosts
{
"kube-master": [
"master-1"
],
"kube-node": [
"node-sml-1",
curl -s -L \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer ghp_TOKEN" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
"https://api.github.com/orgs/ORG/repos?per_page=100" \ | |
| jq -r '.[].git_url' \ | |
| grep $pattern | xargs -n1 -I{} -- sh -c 'git clone {} ./repos/$(basename {} .git)' |
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; |
{"lastUpload":"2022-02-06T17:08:58.756Z","extensionVersion":"v3.4.3"} |
package main | |
func main() {} | |
//nolint:deaccode | |
func add(a, b int) int { | |
a += 10 | |
b += 11 | |
return a + b | |
} |
#!/usr/bin/env bash | |
AWS_CLI="aws --region $AWS_REGION" | |
PRICE=0.2 | |
USER_NAME=#USERNAME# | |
KEY_NAME=#KEY NAME# | |
SECURITY_GROUP_ID=#SECURITY GROUP# | |
SUBNET_ID=#SUBNET# | |
VOLUME_SIZE=40 | |
INSTANCE_TYPE=t2.2xlarge |
Output of dinamic inventory.
> ./hosts
{
"kube-master": [
"master-1"
],
"kube-node": [
"node-sml-1",
# Compare two versions, in version format Major.Minor.Patch | |
# It doesn't validate version format, only compare values. | |
# | |
# Usage : | |
# version_compare <compared> <required> | |
# | |
# Example: | |
# version_compare 0.13.1 0.11.0 | |
# | |
# returns |
Installing Go kernel for Jupyter notebooks
brew install zeromq
brew install pkg-config
https://github.com/gopherdata/gophernotes
go get -u github.com/gopherdata/gophernotes
mkdir -p ~/Library/Jupyter/kernels/gophernotes
p $GOPATH/src/github.com/gopherdata/gophernotes/kernel/* ~/Library/Jupyter/kernels/gophernotes
Let's imagine we have a lot of mp3 files ( forexample one of the pluralsite courses converted to mp3 ).
URL=https://www.pluralsight.com/courses/run-effective-meetings
PASS=pass
USER=user
OUTPUT="%(playlist_index)s. %(title)s-%(id)s.%(ext)s"
youtube-dl --username $USER --password $PASS -o $OUTPUT --extract-audio --audio-format mp3 $URL