Skip to content

Instantly share code, notes, and snippets.

@chiller
chiller / recipe.md
Last active February 13, 2021 16:52
Bread

Choice of flour and other parameters

The easiest way to get a well rising bread is to use high-protein flour >=12g / 100g https://www.instagram.com/p/BiJhdU_gHkd

Kitchen temperature for reference is 23, but a hot kitchen will significantly speed up the process.

Sponge -- hour 0 (+ however much it took to get active starter)

@john2x
john2x / 00_destructuring.md
Last active July 9, 2024 01:38
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
char *buf1 = malloc(256);
char *buf2 = malloc(512);
char *buf3 = malloc(1024);
char *top, *aftertop;
@davidjbeveridge
davidjbeveridge / underscore_camelize.coffee
Created October 1, 2012 18:59
Underscore and Camelize in CoffeeScript
each = (arr, func, index=0) ->
if index < arr.length then [ func(arr[index], index), each(arr, func, index + 1)... ] else []
camelize = (input) ->
pieces = input.split(/[\W_-]/)
each(pieces, capitalize).join("")
capitalize = (input) ->
input.charAt(0).toUpperCase() + input.slice(1)
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@maraujop
maraujop / forms.py
Created February 15, 2012 19:04
django-crispy-forms bootstrap form example
# -*- coding: utf-8 -*-
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field
from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions
class MessageForm(forms.Form):
text_input = forms.CharField()