Skip to content

Instantly share code, notes, and snippets.

View lsbardel's full-sized avatar
☀️
magic

Luca Sbardella lsbardel

☀️
magic
View GitHub Profile
@lsbardel
lsbardel / .block
Last active August 29, 2023 10:31
Lloyd’s Relaxation
license: bsd-3-clause
@lsbardel
lsbardel / .block
Last active September 7, 2022 21:35
d3-view modal
license: bsd-3-clause
@lsbardel
lsbardel / History|-10e694c6|entries.json
Last active September 7, 2022 17:10
My Visual Studio Code settings
{"version":1,"resource":"file:///Users/luca/workspace/byte-tooling/byte/infralib/project.py","entries":[{"id":"Z0PC.py","timestamp":1660664245368},{"id":"gyP5.py","timestamp":1660664319191},{"id":"vyMp.py","timestamp":1660664358135},{"id":"PGAX.py","timestamp":1660664429116},{"id":"Cdca.py","timestamp":1660664488657},{"id":"CE2f.py","source":"moved.source","timestamp":1660664530925},{"id":"syw3.py","source":"moved.source","timestamp":1660664535258}]}
@lsbardel
lsbardel / .block
Last active September 4, 2022 22:11
Todo app with d3-view
license: bsd-3-clause
@lsbardel
lsbardel / .block
Last active July 31, 2021 08:24
Triangular mesh on Canvas
license: bsd-3-clause
@lsbardel
lsbardel / redis-server-for-init.d-startup
Created December 15, 2009 21:01 — forked from mtodd/redis-server-for-init.d-startup
Init.d Redis script for Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@lsbardel
lsbardel / LazyChoiceField.py
Created November 11, 2009 22:25
Lazy ChoiceField for Django. This field will unwind choices only when a new instance of a Form is created.
class LazyChoiceField(forms.ChoiceField):
'''
A Lazy ChoiceField.
This ChoiceField does not unwind choices until a deepcopy is called on it.
This allows for dynamic choices generation every time an instance of a Form is created.
'''
def __init__(self, *args, **kwargs):
# remove choices from kwargs.
# choices should be an iterable
self._lazy_choices = kwargs.pop('choices',())

Keybase proof

I hereby claim:

  • I am lsbardel on github.
  • I am lsbardel (https://keybase.io/lsbardel) on keybase.
  • I have a public key whose fingerprint is 889F 1D86 1C5B F5D0 1CD5 4855 E45C FE59 31BD 1D42

To claim this, I am signing this object:

@lsbardel
lsbardel / .block
Last active November 26, 2019 18:44
Red-Black Binary Tree
license: bsd-3-clause
@lsbardel
lsbardel / .block
Last active October 23, 2019 20:33
Wavy Sunset
license: bsd-3-clause