Skip to content

Instantly share code, notes, and snippets.

View Skarlso's full-sized avatar
🏫
On training

Gergely Brautigam Skarlso

🏫
On training
View GitHub Profile
@Skarlso
Skarlso / introrx.md
Created January 14, 2016 09:26 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

Keybase proof

I hereby claim:

  • I am Skarlso on github.
  • I am skarlso (https://keybase.io/skarlso) on keybase.
  • I have a public key whose fingerprint is BD46 E84F 4913 4E89 2A95 B233 494D C55F ED55 B406

To claim this, I am signing this object:

@Skarlso
Skarlso / # emacs-plus - 2016-07-14_07-10-05.txt
Created July 14, 2016 05:11
emacs-plus (d12frosted/emacs-plus/emacs-plus) on Mac OS X 10.10.5 - Homebrew build logs
Homebrew build logs for d12frosted/emacs-plus/emacs-plus on Mac OS X 10.10.5
Build date: 2016-07-14 07:10:05
@Skarlso
Skarlso / # emacs-plus - 2016-07-14_07-15-56.txt
Created July 14, 2016 05:16
emacs-plus (d12frosted/emacs-plus/emacs-plus) on Mac OS X 10.10.5 - Homebrew build logs
Homebrew build logs for d12frosted/emacs-plus/emacs-plus on Mac OS X 10.10.5
Build date: 2016-07-14 07:15:56
@Skarlso
Skarlso / # emacs-plus - 2016-07-14_07-22-25.txt
Created July 14, 2016 05:22
emacs-plus (d12frosted/emacs-plus/emacs-plus) on Mac OS X 10.10.5 - Homebrew build logs
Homebrew build logs for d12frosted/emacs-plus/emacs-plus on Mac OS X 10.10.5
Build date: 2016-07-14 07:22:25

Spacemacs

Tabs => Buffers

  • Quick switching: SPC + TAB
  • Show all tabs: SPC b b
  • Kill the buffer instead of :q -> This exits
  • Comment out a whole line standing anywhere in it: SPC ; ;
@Skarlso
Skarlso / wavdecode.go
Last active November 24, 2016 19:36
Decrypt Wav File
package main
import (
"fmt"
"io/ioutil"
"os"
)
var delimiter = [...]byte{96, 240, 96, 240}
var beatDelimiter = [...]byte{160, 15}
// Copyright [2016] <Gergely Brautigam>
#include "./bob.h"
#include <boost/algorithm/string.hpp>
#include <string>
std::string bob::hey(std::string text) {
boost::trim_right(text);
if (text.empty()) {
return "Fine. Be that way!";
}
@Skarlso
Skarlso / aoc_2016_day1_part1.rb
Last active December 1, 2016 09:57
Advent Of Code 2016 Day 01
path = [[]]
file = File.open("input.txt")
contents = file.read
split = contents.split(", ")
split.each do |s|
m = s.match(/([L|R])(\d+)/)
l = m[1]
n = m[2]
path << [l, n.to_i]
end
@Skarlso
Skarlso / command.class.php
Created January 17, 2017 09:07 — forked from cangelis/command.class.php
A simple Command Pattern implementation (Calculator example) on PHP
<?php
abstract class Command {
abstract public function unExecute ();
abstract public function Execute ();
}
class concreteCommand extends Command {
private $operator,$operand,$calculator;
public function __construct ($calculator,$operator,$operand) {
$this->operator = $operator;
$this->operand = $operand;