Skip to content

Instantly share code, notes, and snippets.

View termoose's full-sized avatar

Ole Andre Birkedal termoose

  • Oslo
View GitHub Profile
Only in music_geir: (1980) Iron Maiden
Only in music_geir: (1981) Killers
Only in music_geir: (1982) The Number Of The Beast
Only in music_geir: (1983) Piece Of Mind
Only in music_geir: (1984) Powerslave
Only in music_geir: (1986) Somewhere In Time
Only in music_geir: (1988) Seventh Son Of A Seventh Son
Only in music_geir: (1990) No Prayer For The Dying
Only in music_geir: (1992) Fear Of The Dark
Only in music_geir: (1995) The X Factor
.........398.............551.....................452..................712.996.................646.40...1.....875..958.553...................
..................................661..-844......*.../781...835..#163....*.......698.239.........*.....*.............*............*57.......
.....................&...............*......+..139..................................*.........-.......282......................301..........
........518..........918..-....472..172....776......207............38........................860..............274..945.....162..............
........@..........#.....845..*........................*.............*....896...+.....153................@......*...*.......#.........441...
..................740.21.....303...744.........190......173.395...729...-....&..925....@..5..............172...566..193...........#.........
...598...967*.........*...........*.......164.=......91......*...........192................292...........................414=.215..........
.............238.......661.....-.149.

Keybase proof

I hereby claim:

  • I am termoose on github.
  • I am termos (https://keybase.io/termos) on keybase.
  • I have a public key whose fingerprint is 798A 2030 AFF6 D9E3 1F85 ADC9 A3E1 C76D 709C 9C92

To claim this, I am signing this object:

@termoose
termoose / callback.ex
Created July 23, 2018 17:31
Elixir callbacks
defmodule Mod do
use GenServer
def start_link(_args) do
GenServer.start_link(__MODULE__, :ok)
end
def init(:ok) do
send(self(), :work)
{:ok, :ok}
0x055cEa822bf636Efc9B3d85F24A2c2fb8a6d45b9
0x055cEa822bf636Efc9B3d85F24A2c2fb8a6d45b9
@termoose
termoose / gist:4eb507c9f4817d4d8b9f
Created April 10, 2015 10:02
Variadic templates
void Add() { }
void Add(std::string data)
{
vector.push_back(data);
}
template<typename... Args>
void Add(std::string first, Args... args)
{
# Deleter.ex
defmodule Ekko.Deleter do
use GenServer
def start_link() do
GenServer.start_link(__MODULE__, [], name: Deleter)
end
def handle_call(:delete, from) do
IO.puts "handle_call in Deleter called"
template<typename T> using Index = typename T::iterator::difference_type;
template<typename T>
std::pair<typename T::iterator::difference_type, T> prefix_match(T a, T b)
{
auto mismatch = std::mismatch(a.cbegin(), a.cend(), b.cbegin());
auto index = std::distance(a.cbegin(), mismatch.first);
return std::make_pair(index, T(a.cbegin(), mismatch.first));
}
std::vector<int> range(int a, int b)
{
std::vector<int> result(b-a);
std::iota(std::begin(result), std::end(result), a);
return result;
}
for(int i : range(5, 10))
{