Skip to content

Instantly share code, notes, and snippets.

View davidbgk's full-sized avatar
🚪
Let’s escape GAFAM+ when/while we can!

David Larlet davidbgk

🚪
Let’s escape GAFAM+ when/while we can!
View GitHub Profile
@jlecour
jlecour / stages_dev_autrement.md
Created October 1, 2010 15:16
Autrement propose des stages dans son équipe Développement

Autrement propose des stages dans son équipe Développement

L'équipe technique d'Autrement (Timothée Barray, Christophe Moins et Jérémy Lecour) s'amuse (enfin travaille) avec plein de technos différentes pour produire ses sites web (http://chambresapart.fr/, http://hotelhotel.com/, …) et ses applications mobiles (Apple iOS et Android). Pour ça on manipule des langages aussi variés que Ruby (et Rails), PHP (et Symfony), Objective-C, Java et Javascript, on utilise des bases de données SQL et NOSQL, on fait du design en HTML/CSS, …

Nous recherchons 1 ou 2 stagiaires à qui nous proposons de participer pendant quelques mois à la mise en place, la maintenance et l'évolution de technologies et composants stables/éprouvés autant que chercher du côté d'éléments émergents/innovants pour utiliser au mieux les outils disponibles.

Plus concrè

@philikon
philikon / wtf8.py
Created February 8, 2011 08:22
WTF-8 codec for Python
# wtf8.py
import codecs
def encode(input, errors='strict'):
return input.encode('utf-8', errors).decode('latin-1', errors).encode('utf-8', errors), len(input)
def decode(input, errors='strict'):
return input.decode('utf-8', errors).encode('latin-1', errors).decode('utf-8', errors), len(input)
class StreamWriter(codecs.StreamWriter):
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@pydanny
pydanny / field.html
Created November 8, 2011 16:33
django-uni-form + Twitter Bootstrap
<!-- this usually goes in <project-root>/templates/uni_form/field.html -->
{% if field.is_hidden %}
{{ field }}
{% else %}
<div class="clearfix {% if field.errors %}error{% endif %}">
<label for="{{ field.auto_id }}" {% if field.field.required %}class="requiredField"{% endif %}>
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
</label>
<div class="input">
@idan
idan / storage.py
Created January 19, 2012 08:11
Django-staticfiles with storage on S3, delivering Protocol-relative URLs
from urlparse import urlsplit, urlunsplit
from storages.backends.s3boto import S3BotoStorage
from staticfiles.storage import CachedFilesMixin
class ProtocolRelativeS3BotoStorage(S3BotoStorage):
"""Extends S3BotoStorage to return protocol-relative URLs
See: http://paulirish.com/2010/the-protocol-relative-url/
"""
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
#
# http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/
#
@panicsteve
panicsteve / gist:1641705
Created January 19, 2012 18:26
Form letter template for acquired startups
Dear soon-to-be-former user,
We've got some fantastic news! Well, it's great news for us anyway. You, on
the other hand, are fucked.
We've just been acquired by:
[ ] Facebook
[ ] Google
[ ] Twitter
@thom4parisot
thom4parisot / functions.php
Created February 29, 2012 14:12
WordPress + AlwaysData + HTTPS = #win
<?php
add_action('init', 'alwaysdata_ssl');
/**
* Enables proper HTTPS detection with WordPress and Alwaysdata
*/
function alwaysdata_ssl()
{
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
@tobiash
tobiash / qredis.coffee
Created June 6, 2012 20:30
Q + node_redis
# Applies Q.nbind to all redis operations and returns a wrapped client
_ = require("underscore")._
Q = require "q"
nbindOps = (client) ->
functions = _.functions client
# All the ops are available as upper/lowercase functions, I exploit this
# to filter out the Redis operations from the other functions of the client
#