Skip to content

Instantly share code, notes, and snippets.

"tag_system": {
"icpc-2": {
"category": {
"A": "Général et non spécifié",
"B": "sang; système hématopoiétique et immunologique",
"D": "Système digestif",
"F": "Oeil",
"H": "Oreille",
"K": "cardio-vasculaire",
"L": "ostéo-articulaire",
@dams
dams / .screenrc
Last active February 2, 2023 11:00
My screen config
# Major change: instead of Ctrl-a, we use Ctrl-o, because Ctrl-a is used for "go to the start of the line" in shells
escape ^Oo
# utf8
defutf8 on
# no annoying audible bell, please
vbell on
@dams
dams / test_gc.exs
Last active October 12, 2022 20:16
defmodule Test do
def question_1(), do: question_1(100_000_000)
def question_1(num), do: question_1(num, rem(num, 1119))
def question_1(num, 0), do: num
def question_1(num, _), do: question_1(num+1)
def question_2(num) do
num
|> Integer.to_string()
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
LIGHT_YELLOW="\[\033[1;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[0;37m\]"
LIGHT_WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
try {
let homeAddress: string | null = null;
let homeSearchCenter: Coordinates | null = null;
let workAddress: string | null = null;
let workSearchCenter: Coordinates | null = null;
const response = await api.get(`/users/${userId}/geolocate`);
if (!_.isNil(response.user)) {
homeAddress = capitalizeProperNoun(response.user.address);

intro

  • Remote Dictionary Server
  • Salvatore Sanfilippo (antirez)
  • 2010 embauché par VMWare, puis Redis sponsorié par Pivotal 2013
  • 2015 Redis Labs

histoire

  • LiveJournal (1999) Brad Fitzpatrick
  • Memcached inventé là-bas (2003)
### Keybase proof
I hereby claim:
* I am dams on github.
* I am dams (https://keybase.io/dams) on keybase.
* I have a public key whose fingerprint is 2836 F02C F2DD C65B B030 4B52 456F 2200 3FA5 2448
To claim this, I am signing this object:
is_primary_for_doc(BKey) ->
{ok, CHBin} = riak_core_ring_manager:get_chash_bin(),
DocIdx = riak_core_util:chash_key(BKey),
Itr = chashbin:iterator(DocIdx, CHBin),
MyNode = node(),
case chashbin:itr_value(Itr) of
{_Idx, Node} when Node == MyNode -> true;
{_Idx, _Node} -> false
end.
@dams
dams / gist:5876003
Last active December 19, 2015 01:29
void mapping_convert_inline_c(SV* hash_ref, SV* dict_ref) {
HV* hash;
HE* hash_entry;
int num_keys, i;
SV* sv_key;
SV* sv_val;
SV* sv_val2;
HV* dict;
~/Devel/mo-pm xs_classaccessor2 ➔ git reset --hard df263586703f53576e4e334e156d6e9e18002504
HEAD is now at df26358 class xs accessor feature
~/Devel/mo-pm xs_classaccessor2 ➔ git push origin xs_classaccessor
Everything up-to-date
~/Devel/mo-pm xs_classaccessor2 ➔ git push -f origin xs_classaccessor
Everything up-to-date