Skip to content

Instantly share code, notes, and snippets.

View lexruee's full-sized avatar
👻
tinkering

Alexander Rüedlinger lexruee

👻
tinkering
View GitHub Profile
@lexruee
lexruee / diff_array.rb
Created March 19, 2020 19:00
Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both.
def diff_array(first_array, second_array)
(first_array - second_array) + (second_array - first_array)
end
@lexruee
lexruee / find_missing_letter.rb
Last active March 19, 2020 18:26
Find the missing letter in the passed letter range and return it.
def find_missing_letter(range)
chars = range.chars
max_char = chars.max
min_char = chars.min
missing_chars = (min_char..max_char).to_a - chars
missing_chars.first
end
p find_missing_letter "abde"
p find_missing_letter "abcdefgijk"
@lexruee
lexruee / gist:300ca4ee17d603e2989f9f16ca61f85a
Created June 30, 2019 19:06
Installing spotify on arch linux
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 931FF8E79F0876134EDDBDCCA87FF9DF48BF1C90
yay -S spotify
@lexruee
lexruee / gist:8832edd35464e9519d6726aeb7a08965
Last active February 17, 2019 15:58
commands to create a html file from the ruby code style guide
git clone https://github.com/rubocop-hq/ruby-style-guide
cd ruby-style-guide
pandoc README.md -o ruby-code-style-guide.html
@lexruee
lexruee / gist:1650bed42a060c49f75c8941e4aa6bec
Created November 12, 2018 22:27
Ubuntu Upgrade path from 14.04 LTS to 18.04 LTS
# Ubuntu 14.04 LTS Upgrade zu Ubuntu 16.04.5 LTS
```
sudo apt update
sudo apt upgrade
sudo apt install update-manager-core
sudo do-release-upgrade
```
## Nachdem Upgrade auf Ubuntu 16.04 LTS
@lexruee
lexruee / vim_cheatsheet.md
Created September 22, 2018 19:49 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@lexruee
lexruee / ethminer-help.md
Last active February 15, 2018 23:14
ethminer-help.md

Ethminer 0.14.0.dev1

Installation on GNU/Linux

git clone https://github.com/ethereum-mining/ethminer
cd ethminer; mkdir build; cd build
cmake ..
cmake --build .
sudo make install
@lexruee
lexruee / Vagrantfile
Created November 8, 2017 18:48
Vagrantfile to create a Ubuntu 17.10 vm
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/artful64"
config.vm.provider 'virtualbox' do |v|
v.gui = true
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update -y
apt-get dist-upgrade -y
apt-get install -y git make
@lexruee
lexruee / gist:c9b16ee1710bf64e8738dcf35885d4de
Last active October 27, 2017 17:48
GNOME3, xkb & VIM: Remap CAPSLOCK to ESCAPE
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:escape']"
@lexruee
lexruee / tmux-cheatsheet.markdown
Created October 22, 2017 15:33 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname