Skip to content

Instantly share code, notes, and snippets.

View antonfisher's full-sized avatar

Anton Fisher antonfisher

View GitHub Profile
@antonfisher
antonfisher / server.go
Last active June 9, 2019 23:52
HTTP PUT servers on Node.js and Go with calculating MD5 sums of uploaded files
//
// Usage:
// env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o server server.go && ./server
// Test:
// dd if=/dev/urandom of=./archive.2gb.zip bs=1024KB count=2000
// time curl --upload-file archive.2gb.zip http://localhost:9001
//
package main
@antonfisher
antonfisher / index.html
Created March 25, 2019 22:01
math-loader
CSS Loaders:
<div class="loader">
<div class="item item-0">
<div class="ball"></div>
</div>
<div class="item item-30">
<div class="ball"></div>
</div>
<div class="item item-60">
<div class="ball"></div>
@antonfisher
antonfisher / install-nexentastor-csi-driver-to-minikube.md
Last active November 29, 2018 21:26
Install NexentaStor CSI Driver to Minikube

Install NexentaStor CSI Driver to Minikube

Requirements

  • Ubuntu 18.04
  • root user access

Steps

  1. Install dependencies:
@antonfisher
antonfisher / install-nexentastor-csi-driver-to-microk8s.md
Last active June 1, 2021 14:03
Install NexentaStor CSI Driver to MicroK8s

Install NexentaStor CSI Driver to MicroK8s

Requirements

  • Ubuntu 18.04
  • root user access

Steps

  1. Install dependencies:
@antonfisher
antonfisher / allow-privileged-for-microk8s.md
Last active September 24, 2021 09:53
MicroK8s add --allow-privileged=true flag

Add --allow-privileged=true to:

# kubelet config
sudo vim /var/snap/microk8s/current/args/kubelet

#kube-apiserver config
sudo vim /var/snap/microk8s/current/args/kube-apiserver

Restart services:

func waitForTask(id string) (err error) {
done := make(chan error)
timer := time.NewTimer(0)
timeout := time.After(10 * time.Seconds)
go func() {
for {
select {
case <-timeout:
timer.Stop()
#!/usr/bin/env bash
# Run this script from githib:
#bash <(curl -s https://gist.githubusercontent.com/antonfisher/06461c7ac9ba147884222a2cea815fda/raw/77af2d09d7ed517f641fc888d0ff3ff12604d4e5/deploy-minikube-nexentaedge-cluster-on-ubuntu.sh)
# cleanup
#sudo apt remove virtualbox kubectl; sudo rm -rf /usr/local/bin/minikube; rm -rf ~/.minikube
# port forwarding if run inside ubuntu vm (IP - vm ip)
#sudo ssh -L 0.0.0.0:80001:IP:31080 root@IP
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"jsxBracketSameLine": false,
"arrowParens": "always"
[user]
name = Anton Fisher
email = a.fschr@gmail.com
[color]
diff = auto
status = auto
branch = auto
ui = true
[alias]
st = status
sudo apt install git vim redshift nodejs npm htop guake gnome-tweak-tool;
redshift -l list
# redshift -l geoclue2
sudo update-alternatives --config editor
# bind keyboard source change to CapsLosk
#gsettings get org.gnome.desktop.input-sources xkb-options
#gsettings set org.gnome.desktop.input-sources xkb-options "[]"
#gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Alt>Shift_L']" #['Caps_Lock']