Skip to content

Instantly share code, notes, and snippets.

firstrow /
Created Oct 4, 2019
MacOS Mojave GDB cosign
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
<plist version="1.0">
firstrow / arch-linux-install
Created Jan 28, 2019 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide ( contains a more verbose description.
# Download the archiso image from
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
View install protoc compiler
mkdir /tmp/protoc && cd "$_"
sudo cp bin/protoc /usr/local/bin/protoc

Keybase proof

I hereby claim:

  • I am firstrow on github.
  • I am firstrow ( on keybase.
  • I have a public key ASCO_4vb5x_A7wd5exCo8Po2ajjKWEvMnqVNG3Me_22Ilgo

To claim this, I am signing this object:

firstrow / gist:392bce9ea8c00d3634479f5798ed958b
Last active Jun 10, 2017 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest
View gist:392bce9ea8c00d3634479f5798ed958b

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 1 > Bridged Adapter

firstrow / rabbitmq_reconnect.go
Created Apr 24, 2017 — forked from svcavallar/rabbitmq_reconnect.go
Golang example to reconnect to RabbitMQ on a connection closed event
View rabbitmq_reconnect.go
package main
import (
var amqpUri = flag.String("r", "amqp://guest:guest@", "RabbitMQ URI")
firstrow / sql_logger.rb
Created Jan 5, 2017
Log active record SQL call line
View sql_logger.rb
module LogQuerySource
def debug(*args, &block)
return unless super
backtrace = Rails.backtrace_cleaner.clean caller
# logger.debug(backtrace)
relevant_caller_line = backtrace.detect do |caller_line|
firstrow / count.rb
Created Dec 16, 2016
active record count queries
View count.rb
def count_queries(&block)
p "--------- Start Count SQL -----------"
count = 0
counter_f = ->(name, started, finished, unique_id, payload) {
unless payload[:name].in? %w[ CACHE SCHEMA ]
count += 1
ActiveSupport::Notifications.subscribed(counter_f, "sql.active_record", &block)
firstrow / .vimperatorrc.local.vim
Created Sep 27, 2016 — forked from igal/.vimperatorrc.local.vim
My Vimperator configuration
View .vimperatorrc.local.vim
"===[ Settings ]========================================================
" Autocomplete using Firefox Awesomebar subsystem
set complete=l
" Show completions as you type? '' waits for tab, 'auto' shows them immediately
set wildoptions=''
" Select the longest autocomplete match
set wildmode='list:full'
View macos -> linux