Skip to content

Instantly share code, notes, and snippets.

View kriwil's full-sized avatar

Aldiantoro Nugroho kriwil

View GitHub Profile
@honi
honi / devrqworker.py
Last active February 1, 2022 15:57
RQ worker wrapper that autoreloads - use only during development
import os
import shlex
import subprocess
from django.core.management.base import BaseCommand
from django.utils import autoreload
class Command(BaseCommand):
def add_arguments(self, parser):
import sys
from django.conf import settings
settings.configure(
DEBUG=True,
SECRET_KEY='thisisthesecretkey',
ROOT_URLCONF=__name__,
MIDDLEWARE_CLASSES=(
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
@evancz
evancz / data-interchange.md
Last active October 31, 2024 12:01
Why do I have to write JSON decoders in Elm?

A vision for data interchange in Elm

How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?

These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.

Literature Review

By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.

#!/usr/bin/env bash
# Install Xcode Command Line Tools.
xcode-select --install
# Install Homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install brew basics (auto-updating).
brew install terminal-notifier
@nicinabox
nicinabox / lets split build guide.md
Last active January 28, 2023 04:10
This guide covers building a Let's Split v2.

This guide has moved

To improve collaboration this guide is now available on GitHub.

Continue reading

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@adewes
adewes / Makefile
Created November 12, 2015 10:28
The build watcher: Automatically rebuild Pelican content as files change.
# Changes gather, and now my watch begins.
# It shall not end until my death.
# I shall live and die at my post.
# I am the process in the darkness.
# I am the watcher on the files.
# I am the shield that guards the realms of the build dir.
watch:
@which inotifywait || (echo "Please install inotifywait";exit 2)
@while true ; do \
@leafgarland
leafgarland / gruvbox-cmd-colours.reg
Created July 22, 2015 22:37
Set Windows cmd window colours, based on gruvbox for vim https://github.com/morhetz/gruvbox
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:00282828
"ColorTable01"=dword:00888545
"ColorTable02"=dword:001a9798
"ColorTable03"=dword:006a9d68
"ColorTable04"=dword:001d24cc
"ColorTable05"=dword:008662b1
"ColorTable06"=dword:002199d7