Skip to content

Instantly share code, notes, and snippets.

View tobiasvl's full-sized avatar
🦀
Learning Rust

Tobias V. Langhoff tobiasvl

🦀
Learning Rust
View GitHub Profile
@tobiasvl
tobiasvl / masseutsendelse.md
Last active August 29, 2015 13:59
Eksempel på kommandoer for å sende ut masseutsendelser på UiO med mutt

Masseutsendelser på UiO

Del opp adressefilen

split -l 1000 student-adresser.txt STUDENT

Send ut

@tobiasvl
tobiasvl / postmaster.md
Last active August 29, 2015 13:59
Hendige kommandoer for postmestre på UiO (som bruker stacken RHEL5 på ServiceGuard, Cyrus IMAP, Exim og Sympa)

Jukselapp for Postmaster ved UiO

Hvem har ukevakt?

alias vakt='svn up ~/src/postmaster-core/dok/vakt/vaktliste/; grep "^ *`date +'%V'`" ~/kode/postmaster-core/dok/vakt/vaktliste/index.rst'

Keybase proof

I hereby claim:

  • I am tobiasvl on github.
  • I am tvl (https://keybase.io/tvl) on keybase.
  • I have a public key whose fingerprint is 805D 8300 6D52 F8BC CCB1 A556 FBD3 F4A9 6CEB BF95

To claim this, I am signing this object:

@tobiasvl
tobiasvl / cvs2git.md
Last active August 29, 2015 14:02
Konvertering av cerebrum_sites fra CVS til Git
@tobiasvl
tobiasvl / twitch_mod.mrc
Last active August 29, 2015 14:06
Twitch IRC bot
on *:text:!*:#: {
var %get $+(#,.,$1)
var %name $1
var %text $readini(cmds.ini,%get,text)
if (!%text) {
/msg #
}
else {
if (%flood3) { return }
set -u0 %flood3 off
require 'parslet'
require 'parslet/convenience'
require 'awesome_print'
require 'byebug'
class LocationParser < Parslet::Parser
# literals
rule(:space) { str(' ') }
rule(:spaces) { space.repeat(0) }
@tobiasvl
tobiasvl / multiple_blocks.rb
Last active August 29, 2015 14:26 — forked from 0x0dea/silly?.rb
Hack to execute one block after another based on a boolean value
def true.-(a, &b) a[] end
def false.-(a, &b) b[] end
(1 == 1).--> { :ok } { fail Math }
def decrypt(row, cipher):
plain = ""
seed = ((row * 0x1E2F) + 0xFE64) & 0xFFFFFFFF
for byte in bytes.fromhex(cipher):
mask = (seed >> 8) & 0xFF
plain += chr(byte ^ mask)
seed = (((seed + byte) * 0x0E6C9AA0) + 0x196AAA91) & 0xFFFFFFFF
plain = re.sub("[^0-9]", "", plain)
return plain
@tobiasvl
tobiasvl / cvs2git.md
Last active May 9, 2020 07:04
Convert CVS repo to Git
@tobiasvl
tobiasvl / 0main.md
Created July 4, 2016 12:41 — forked from canton7/0main.md
Local versions of tracked config files

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application