Skip to content

Instantly share code, notes, and snippets.

View grudelsud's full-sized avatar
😜
specialisation is for insects

Thomas Alisi grudelsud

😜
specialisation is for insects
View GitHub Profile
@grudelsud
grudelsud / gist:1312872
Created October 25, 2011 14:16
video awaiting rendering
<videos>
<video>
<backplate_file_name>backplate110922.mp4</backplate_file_name>
<clip_duration>3.4</clip_duration>
<cut_point>8.4</cut_point>
<height>720</height>
<insert_point>14.5</insert_point>
<scene_id>3</scene_id>
<file_id>de00fc2ad4056cfef759b65539546db2</file_id>
<width>1280</width>
@grudelsud
grudelsud / index.html
Created August 24, 2012 15:02
initialize google maps with twitter bootstrap tabs
<!-- content -->
<div class="span10">
<!-- tabs -->
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab_media" data-toggle="tab">View</a></li>
<li><a href="#tab_map" id="tab_map_link" data-toggle="tab">Visit</a></li>
</ul>
</div>
@grudelsud
grudelsud / webspeech_miclevel.js
Created April 23, 2013 09:12
sample code of mic level + webspeech. the code kind of works, but asks twice for mic authorization.
var that = this;
var recognition = new webkitSpeechRecognition();
recognition.continuous = true;
recognition.interimResults = true;
recognition.onstart = function()
{
var context = new webkitAudioContext();
navigator.webkitGetUserMedia(
class ClubNight(BaseModel):
"""club nights are series of events and organized by someone. e.g. 'don't look back'"""
name = ndb.StringProperty()
content = ContentProperty(ndb.TextProperty)
blob_key_logo = ContentProperty(ndb.BlobKeyProperty, verbose_name='Club night logo')
genre = ndb.KeyProperty(kind='Genre')
website = ContentProperty(ndb.StringProperty)
address = ContentProperty(ndb.TextProperty)
location = ContentProperty(ndb.GeoPtProperty)
class BaseModel(ndb.Model):
@classmethod
def populate(cls, key):
self = key.get()
sources = getattr(self.__class__, 'sources', False)
source_data = {}
if not sources:
return False
for source_name in sorted(sources.keys(), key=lambda k: 0 if k == 'gplus' else 9):
source_id_property = 'source_id_' + source_name
@grudelsud
grudelsud / fields.py
Last active August 29, 2015 14:14 — forked from vdboor/fields.py
from django.core.exceptions import ImproperlyConfigured
from rest_framework import serializers
from rest_framework.serializers import SortedDictWithMetadata
from .utils import create_translated_fields_serializer
class TranslatedFieldsField(serializers.WritableField):
"""
Exposing translated fields for a TranslatableModel in REST style.
"""
@grudelsud
grudelsud / gist:6e4c471e98f7a5cee3d0
Created June 30, 2015 09:25
ng-file-upload example
// upload list of files
$scope.onFileSelect = function ($files) {
//$files: an array of files selected, each file has name, size, and type.
for (var i = 0; i < $files.length; i++) {
$scope.uploading = {};
var file = $files[i];
var upload_data = {
url: apiBase,
method: 'POST',
headers: {'X-CSRFToken': CSRF.token() },

Keybase proof

I hereby claim:

  • I am grudelsud on github.
  • I am grudelsud (https://keybase.io/grudelsud) on keybase.
  • I have a public key whose fingerprint is 4E07 B75C 3162 CDD8 F1BE EFAD AB07 8B73 5B76 FB4C

To claim this, I am signing this object:

@grudelsud
grudelsud / devcon-core-open-strategy.md
Created April 28, 2017 09:31
an initial discussion around what the evolution of devcon.london should be, in a collaborative open way

definitions

  • devcon-core is a subset of devcon.london members willing to actively participate to the evolution of the community. the community is flat with no hierarchy, decisions are taken in total democracy and transparency.

meet-ups

27.4.17 @ barbican:

1st round of Action items agreed during 1st meeting