All your notes, scripts, config files and snippets deserve version control and tagging!
gist
is a simple bash script for gist management.
It is lightweight(~700LOC) and dependency-free! Helps you to boost coding workflow.
This file contains hidden or 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
#!/usr/bin/env bash | |
function __ { | |
echo "$@" | |
} | |
function __make_ansi { | |
next=$1 && shift | |
echo "\[\e[$(__$next $@)m\]" | |
} |
This file contains hidden or 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
#!/bin/bash | |
set -ex | |
sudo rm -rf /etc/docker/daemon.json || true | |
sudo rm -rf ${WORKSPACE}/go | |
export CRI_CONTAINERD="yes" | |
export CRI_RUNTIME="containerd" | |
export KATA_HYPERVISOR="qemu" |
This file contains hidden or 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
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
This file contains hidden or 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
set(CMAKE_C_COMPILER clang) | |
set(CMAKE_CXX_COMPILER clang++) | |
# TODO: Implement GetText and LibINTL so I can figure out the blocker on LynsLang. | |
cmake_minimum_required(VERSION 3.18) | |
set(APP_NAME "example-app") | |
project("${APP_NAME}") |
As you may have noticed, I do a feel a bit snarky and frankly, well, misanthropic and completely irreverent when it comes to the state of container orchestration in 2021. You might havev also noticed that I've built more than just a few container clouds in my most recent 5 year foray into container-space. Anyhow, the reason I get all this angst is because I remember what things were like prior to Kubernetes and how simple everything was. Those were "The Good days".
In keeping with that sentiment, I love WASM and Rust and all things FaaS. It's my current mission in life to abstract away the magic that is kubernetes by wrapping my k8s clusters inside a docker
This file contains hidden or 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
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
void FillMatrix(double **matrix, const int size){ | |
for (int i=0; i<size; i++){ | |
for (int j=0; j<size; j++){ | |
cout << "a[" << i+1 << "][" << j+1 << "] = "; | |
cin >> matrix[i][j]; | |
} |
This file contains hidden or 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
{ | |
"theme": "dark", | |
"snippet": { | |
"expanded": true, | |
"newSnippetPrivate": false, | |
"sorting": "updated_at", | |
"sortingReverse": true | |
}, | |
"editor" : { | |
"tabSize": 4 |
This file contains hidden or 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
# syntax=docker/dockerfile:1.2-experimental | |
#FROM node:12-alpine | |
FROM docker:20.10-dind | |
# busybox "ip" is insufficient: | |
# [rootlesskit:child ] error: executing [[ip tuntap add name tap0 mode tap] [ip link set tap0 address 02:50:00:00:00:01]]: exit status 1 | |
RUN apk add --no-cache iproute2 | |
# "/run/user/UID" will be used by default as the value of XDG_RUNTIME_DIR | |
RUN mkdir /run/user && chmod 1777 /run/user |