Skip to content

Instantly share code, notes, and snippets.

View rpt's full-sized avatar
🤘

Krzysztof Rutka rpt

🤘
View GitHub Profile
@rpt
rpt / witcher_contracts.md
Created August 24, 2015 08:09
Witcher contracts / Zlecenia wiedźmińskie

Witcher contracts / Zlecenia wiedźmińskie

White Orchard / Biały Sad

  • Devil by the Well / Licho przy studni (2)

Velen

  • Woodland Beast / Potwór z lasu (6)
  • Patrol Gone Missing / Zaginiony patrol (7)
(def uuid #"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$")
(def amount #"^\d+(,\d{3})*(\.\d{2})?$")
(def currency #"^[a-zA-Z]{3}$")

Trophy checklist

source

  1. Speak to Eileen in the sewer and Little Girl for the Music Box, then defeat Cleric Beast and Father Gascoigne
  2. Talk with Alfred; Purchase Hunter's Chief Emblem then save the game; open all three Cathedral Gates and head to Oedeon Chapel
  3. Kill the Witch of Hemwick, Blood-Starved Beast, Vicar Amelia and then speak to Arianna after they are all dead
  4. Visit the Healing Church Workshop and Abandoned Workshop for the items, then kill Shadow of Yharnam and Rom, the Vacuous Spider
  5. Go to Iosefka's Clinic for the Cainhurst Summons and Umbilical Cord
  6. Return to Yahar'gul and defeat The One Reborn, then go to Nightmare Frontier and kill Amygdala
@rpt
rpt / partial.erl
Last active May 12, 2017 14:19
Partial function in Erlang, who would have thought?...
-module(partial).
-export([partial/2]).
-export([test/0]).
-spec partial(function(), [term()]) -> function().
partial(Fun, Args) when is_function(Fun), is_list(Args) ->
lists:foldl(fun partial1/2, Fun, Args).
@rpt
rpt / bloodborne.md
Last active December 9, 2023 18:55
Bloodborne Checklist
#{"BIF" ;; Burundian Franc
"CLP" ;; Chilean Peso
"DJF" ;; Djiboutian Franc
"GNF" ;; Guinean Franc
"JPY" ;; Japanese Yen
"KMF" ;; Comorian Franc
"KRW" ;; South Korean Won
"MGA" ;; Malagasy Ariary
"PYG" ;; Paraguayan Guaraní
"RWF" ;; Rwandan Franc
@rpt
rpt / fizzbuzz.erl
Created December 23, 2014 15:35
"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”." - http://c2.com/cgi/wiki?FizzBuzzTest
-module(fizzbuzz).
-export([print/0]).
print() ->
FizzBuzz = [fizzbuzz(N) || N <- lists:seq(1, 100)],
io:format("~s~n", [string:join(FizzBuzz, ", ")]).
fizzbuzz(X) ->
reverse([], Acc) ->
Acc;
reverse([X | Xs], Acc) ->
reverse([X | Acc], Xs).
reverse(Xs) ->
reverse(Xs, []).
%% OR
@rpt
rpt / erlcql_api.erl
Last active December 30, 2015 00:49
erlcql API
erlcql:start_link(ConnectionOpts :: proplist()) -> {ok, Pid :: pid()} | {error, Reason :: term()}.
erlcql:q(Pid :: pid(), Query :: bitstring(), RequestOpts :: proplist()) ->
{ok, Response :: response(), Extra :: extra} |
{error, {Code :: integer, Message :: bitstring()}, Extra :: extra()}.
-type response() :: void %% response to INSERT/UPDATE/DELETE/TRUNCATE
| Keyspace :: bitstring() %% response to USE
| SchemaChange :: created | updated | dropped %% response to CREATE/ALTER/DROP
| {Rows :: [[term()]], Cols :: [{Name :: bitstring(), Type :: type()}]}. %% response to SELECT