Skip to content

Instantly share code, notes, and snippets.

@atweiden
atweiden / error-handling.raku
Last active August 27, 2022 07:02
Crash course on Raku error handling
use v6;
=head DESCRIPTION
=pod A crash course on Raku error handling.
# ------------------------------------------------------------------------------
('-' xx 78).join.say; ''.say;
# ------------------------------------------------------------------------------
=head2 Basic error handling
@atweiden
atweiden / AddInsertNewline.vim
Created September 13, 2019 00:15
Insert or append a new blank line in Vim
function! PutBlankLineAbove()
let l:count = v:count ? v:count : 1
normal m`
for i in range(1, l:count)
put! _
endfor
normal ``
execute ":normal \<Left>"
endfunction
@atweiden
atweiden / hiragana.p6
Created January 21, 2019 00:18
Practice hiragana
use v6;
=begin pod
=head Learn Hiragana
=head3 L<Tofugu: Learn Hiragana|https://www.tofugu.com/japanese/learn-hiragana/>
=begin markdown
letter | sound | kana | memorization
@atweiden
atweiden / telescope.p6
Last active October 10, 2017 03:32
Evaluate earnings opportunities with Telescope
use v6;
# p6doc {{{
=begin pod
=head NAME
Telescope
=head SYNOPSIS
@atweiden
atweiden / nvidia.txt
Created June 23, 2016 16:57
Nvidia support
/* vim: ft=journal */
Enabling Nvidia Dedicated Graphics Support
==========================================
- “nvidia 364.16 adds support for DRM kernel mode setting. To
enable this feature, add the `nvidia-drm.modeset=1` kernel parameter,
and add `nvidia`, `nvidia_modeset`, `nvidia_uvm` and `nvidia_drm`
to your initramfs#MODULES.” [1]
/* vim: ft=journal */
Ada Tutorial
============
Variables and Types
-------------------
- Variables must be declared between a procedure/function's `is` and `begin`
statements
@atweiden
atweiden / mac-osx-live-usb-from-iso.md
Created March 20, 2016 06:00
create mac-bootable LiveUSB from Linux ISO

Create LiveUSB from Linux ISO on Mac OS/X

Overview

  • transfer ISO from Linux to Mac OS/X over wifi LAN (optional)
  • create LiveUSB from ISO
  • boot from LiveUSB
@atweiden
atweiden / connect-linux-ethernet-lan-ssh.md
Created March 19, 2016 21:30
directly connect two linux machines using an ethernet cable

ssh/rsync from one Linux machine to another with a standard ethernet cable

Overview

  • Install ifplugd and openssh on both machines.
  • Optionally install inxi on both machines (recommended).
@atweiden
atweiden / fetch-tails.sh
Created March 15, 2016 20:43
Fetch Tails
#!/bin/bash
# depends=('aria2' 'curl' 'gnupg')
_version=2.2
_tails_download_dir="$HOME/Downloads/tails-dl"
_tails_download_url=http://dl.amnesia.boum.org/tails/stable/tails-i386-$_version
_tails_download_name=tails-i386-$_version.iso
# https://tails.boum.org/doc/about/openpgp_keys/index.en.html
# fetch tails gpg sigs {{{
@atweiden
atweiden / guix-notes.md
Created March 14, 2016 19:26
Guix notes

guix notes

overview

  • guix is pronounced geeks
  • guix wants linux-libre kernel for containerization
  • changing any input to a guix package definition results in a different hash on disk (different directory)