Skip to content

Instantly share code, notes, and snippets.

View arbal's full-sized avatar
👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);

Arbal arbal

👌
new Adaptor(this); // new Adaptor(_humans[].Behavior);
  • Los Angeles, CA
  • 07:13 (UTC -07:00)
View GitHub Profile
@arbal
arbal / microk8s_in_lxc.md
Created October 22, 2020 19:43 — forked from acj/microk8s_in_lxc.md
Installing microk8s in an LXC container

Installing microk8s in an LXC container

I wanted to run Microk8s on a Proxmox 6 host inside of an LXC container. These are my notes from the journey.

  1. Create a privileged LXC container through the Proxmox web interface
  • Enable nesting and FUSE
    • In Proxmox UI, select container, then Options > Features > Check nesting and FUSE boxes
  1. SSH into the Proxmox host and edit the container's config in /etc/pve/lxc/.conf
    • Add the following lines lxc.apparmor.profile: unconfined
@arbal
arbal / kubernetes-as-proxmox-container.md
Created October 22, 2020 19:48 — forked from kvaps/kubernetes-as-proxmox-container.md
Run Kubernetes as Proxmox container

Add to your contaier config /etc/pve/lxc/XXX.conf:

lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop: 
lxc.mount.auto: proc:rw sys:rw

@arbal
arbal / gist:3f829a9c9c00407cb6302f6977613a84
Created October 22, 2020 21:37 — forked from Arie/gist:25b260cc02d04a67d282
Installing flent on OS/X with homebrew
`pip install flent matplotlib`
`brew install fping`
Netperf in homebrew is installed without demo mode by default, so we need to edit the recipe slightly, also demo mode fails to build under OS/X, requiring a tiny patch to netlib.c ( http://www.netperf.org/pipermail/netperf-talk/2013-December/001162.html ). The following recipe changes the URL to a prepatched version that I host and changes the configure line to enable demo mode.
`brew edit netperf`
```
class Netperf < Formula
desc "Benchmarks performance of many different types of networking"
@arbal
arbal / README.md
Created November 5, 2020 20:37 — forked from hofmannsven/README.md
Git Cheatsheet
@arbal
arbal / proxmox_lxc_nfs_server.md
Created November 7, 2020 04:35 — forked from rwenz3l/proxmox_lxc_nfs_server.md
Install a NFS Server inside a LXC Container on Proxmox 5.1

Installing NFS inside LXC Container on Proxmox 5.1

Host Setup:

Create LXC Container as usual, but do not start it yet.

# Install NFS-Kernel on Host
apt install nfs-kernel-server
@arbal
arbal / Python3 Virtualenv Setup.md
Created November 18, 2020 08:53 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@arbal
arbal / 01-mac-profiling.md
Created December 1, 2020 20:54 — forked from loderunner/01-mac-profiling.md
Profiling an application in Mac OS X

Profiling an application in Mac OS X

Finding which process to profile

If your system is running slowly, perhaps a process is using too much CPU time and won't let other processes run smoothly. To find out which processes are taking up a lot of CPU time, you can use Apple's Activity Monitor.

The CPU pane shows how processes are affecting CPU (processor) activity:

@arbal
arbal / SakuraKeepaLinker.js
Created December 22, 2020 08:37 — forked from moyashi/SakuraKeepaLinker.js
Amazon.co.jpの商品ページにサクラチェッカーとKeepaへのリンクを追加するUserScript。Tampermonkeyで動作確認
// ==UserScript==
// @name SakuraKeepaLinker
// @namespace http://hitoriblog.com/
// @version 0.2
// @description try to take over the world!
// @author moyashi ( @hitoriblog )
// @match https://www.amazon.co.jp/*/dp/*
// @match https://www.amazon.co.jp/*/gp/*
// @match https://www.amazon.co.jp/dp/*
// @match https://www.amazon.co.jp/gp/*
// ==UserScript==
// @name amazon page add keepa
// @version 0.1
// @description sakura checker frame to amazon page add.
// @updateURL https://gist.github.com/53JIlLenWe11/9ed4287f1f10231abaa8633de5adc790/raw/amazon_page_add_keepa.user.js
// @downloadURL https://gist.github.com/53JIlLenWe11/9ed4287f1f10231abaa8633de5adc790/raw/amazon_page_add_keepa.user.js
// @author 53JIlLenWe11
// @include /^https://(www\.|smile\.)amazon\.co\.jp/(.*/)?[d-g]p//
// @run-at document-end
// @grant none
@arbal
arbal / setup_locales.sh
Last active January 6, 2021 10:20 — forked from ei-grad/setup_locales.sh
Debian locale setup
set -e
set -x
apt-get update
apt-get install locales
echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8" | debconf-set-selections
echo "locales locales/default_environment_locale select en_US.UTF-8" | debconf-set-selections
sed -i 's/^# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
dpkg-reconfigure --frontend=noninteractive locales
update-locale LC_ALL=en_US.UTF-8