Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import sys
CAND_MAX = 34
print(','.join([
'date',
'id',
* [ f+e for f in ['ip', 'eml', 'mob'] for e in [ '_start', '_end' ] ],
### Keybase proof
I hereby claim:
* I am landswellsong on github.
* I am landswellsong (https://keybase.io/landswellsong) on keybase.
* I have a public key whose fingerprint is 876E A0A6 76A9 9FAA F0FF 5C3F A5C7 AE68 853B 9A95
To claim this, I am signing this object:

Hola

  • uno
  • dos
  • tres
@landswellsong
landswellsong / IyAq-0.py
Created June 22, 2017 17:33
null created by landswellsong - https://repl.it/IyAq/0
def my_rec_sum(*args):
s=0
for i in args:
if type(i) == list:
for x in i: s += x
else: s += i
return s
print(my_rec_sum(2,3,4,10,[3,5,7,[2,3,4]]))
@landswellsong
landswellsong / landswellsong_pub.gpg
Last active February 7, 2017 14:23
GPG Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFiZx2ABEACx0HCx7RArh80CqVGCK/+P17XCbUQm4/O3RGprVkGqNBrDhjEe
0KCGH8C1KLg5i2imApY3Vf+IIOSalhwowH0Dn+0JP/Cmotm/641yGgR5+Pf5ArpH
9hcmBPjm1jCKcYfewPCMsnXJFdV9XLz0b3b6JVwFKSGqoviXNCgbGdaJLqR/UYMV
J+6wWe+jd2A+Z8Sajdzul4k+bQY7cn/FGko9oiB6/4cDX0HWLt2wK65T2jo3kHTj
tvv2V1U8JUqazwFDyVSYvgVZKf9VUP4KOr6QKphOq1ldZdnas1Sj+ZGz8QqGs6zO
u6JROMnSjOTAKCF4Pl1yrP7Z0stZo1TvGwk+59NOyNZHmEOegf7dAzR+0kzuKRN9
6oj4R9NyWHbzV0XYSLignsg4lmjMfTwckg18Z0E18fF5XgKt6ZqOsv4/qtHShYvL
+1k06jSenq9vmgvpfwzUic+fwyj7cxfV+7nJDcsw6F/z+EwCEuSGL2nB1hgf+ce4
#include <sodium.h>
#include <stdio.h>
#define CLIENT_ID_SIZE crypto_box_PUBLICKEYBYTES
/* Copied over from DHT.c not to mess around with tox source deps */
int id_closest(const uint8_t *id, const uint8_t *id1, const uint8_t *id2)
{
size_t i;
uint8_t distance1, distance2;
@landswellsong
landswellsong / gist:0d109949ae91f04869bd
Created February 18, 2015 22:43
Clipboard to DPaste
#!/bin/sh
# Use this to paste the contents of your clipboard to dpaste
# Requires curl and xclip, pushing notifications requires libnotify
# TODO: some kind of GUI dialog allowing to select highlighting language probably?
CLIP_TARGET="clipboard" # Target clipboard to use -selection option to xclip, see man 1 xclip for usage
EXPIRY="days=1" # Expiration time, see dpaste API for options
POSTER="$USER" # Poster identification, username by default
# Image for notification, feel free to pick an icon"