Skip to content

Instantly share code, notes, and snippets.

@lucaspwbx
lucaspwbx / conf.org
Created November 22, 2020 23:58 — forked from mtekman/conf.org
Configs (single-file dotfiles using org-mode)
  • Global public configs for multiple utils. Makes use of tangled files.
  • C-c C-v t to export all.

First Run

Nix System

@lucaspwbx
lucaspwbx / installing_virt_manager.md
Created November 20, 2020 18:01 — forked from diffficult/installing_virt_manager.md
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@lucaspwbx
lucaspwbx / macOS_launcher.sh
Created November 20, 2020 17:56 — forked from StefanoBelli/macOS_launcher.sh
Fast OS X launch on QEMU with KVM support enabled. Credits to: https://github.com/kholia, original repository: https://github.com/kholia/OSX-KVM
#!/bin/sh
# qemu-img create -f qcow2 mac_hdd.img 64G
# echo 1 > /sys/module/kvm/parameters/ignore_msrs
#
# Type the following after boot,
# -v "KernelBooter_kexts"="Yes" "CsrActiveConfig"="103"
#
# printf 'DE:AD:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256))
#
@lucaspwbx
lucaspwbx / xhyve-freebsd-tutorial-1.md
Created November 20, 2020 17:53 — forked from tanb/xhyve-freebsd-tutorial-1.md
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

@lucaspwbx
lucaspwbx / vagrant-kvm.md
Created November 20, 2020 17:52 — forked from yuanying/vagrant-kvm.md
How to use vagrant-kvm

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@lucaspwbx
lucaspwbx / free-keys.el
Created November 20, 2020 16:47 — forked from bjorne/free-keys.el
Show free key bindings in Emacs (for the current mode)
(setq free-keys-modifiers (list "C" "M" "C-M"))
(setq free-keys-keys "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,/§1234567890-=[];'\\`±!@#$%^&*()_+}{:\"|?><~")
(defun free-keys ()
(interactive)
(let ((buf (get-buffer-create "*Free keys*")))
(display-buffer buf)
(with-current-buffer buf
(erase-buffer)
(mapc (lambda (modifier)
@lucaspwbx
lucaspwbx / sxrc
Created November 19, 2020 23:20 — forked from gulafaran/sxrc
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
nm-applet 2>&1 > /dev/null &
fullscreengrab 2>&1 > /dev/null &
autocutsel -fork &
autocutsel -selection PRIMARY -fork &
keepassxc &
blueman-applet 2>&1 > /dev/null &
udiskie --tray --use-udisks2 &
xss-lock /home/tom/.local/bin/blanklock &
exec /usr/bin/awesome
@lucaspwbx
lucaspwbx / generate-ssh-key.sh
Last active November 17, 2020 13:25 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
Basic
=====
[Shift]+[Mod]+[Enter] - launch terminal.
[Mod]+[b] - show/hide bar.
[Mod]+[p] - dmenu for running programs like the x-www-browser.
[Mod]+[Enter] - push acive window from stack to master, or pulls last used window from stack onto master.
[Mod] + [j / k] - focus on next/previous window in current tag.