Skip to content

Instantly share code, notes, and snippets.

View ojii's full-sized avatar

Jonas Obrist ojii

View GitHub Profile
@Rich-Harris
Rich-Harris / please-include-a-repro.md
Last active April 29, 2024 15:08
Please include a repro

Please include a repro

You probably arrived here because of a curt message in response to an issue you filed on a repo that I contribute to. Sorry about that (particularly if you filed the issue long ago and have been waiting patiently for a response). Let me explain:

I work on a lot of different open source projects. I really do like building software that makes other people's lives easier, but it's crazy time-consuming. One of the most time-consuming parts is responding to issues. A lot of OSS maintainers will bend over backwards to try and understand your specific problem and diagnose it, to the point of setting up new test projects, fussing around with different Node versions, reading the documentation for build tools that we don't use, debugging problems in third party dependencies that appear to be involved in the problem... and so on. I've personally spent hundreds of hours of my free time doing these sorts of things to try and help people out, because I want to be a responsible maintainer and I

@FinalAngel
FinalAngel / django-cms-frontend.js
Last active December 20, 2015 08:59
Django CMS Frontend Tipps & Tricks
// allow toolbar items to be visible on small screen sizes
$('.cms_toolbar').height(60).find('.cms_toolbar-right').css('display', 'block !important');
@alesdotio
alesdotio / models.py
Created December 4, 2012 13:30
lazy translation getter
def lazy_translation_getter(self, name, default=None):
"""
Lazy translation getter that fetches translations from DB in case the instance is currently untranslated and
saves the translation instance in the translation cache
"""
stuff = self.safe_translation_getter(name, NoTranslation)
if stuff is not NoTranslation:
return stuff
@alexjs
alexjs / cors-nginx.conf
Created November 28, 2012 22:42 — forked from michiel/cors-nginx.conf
Slightly tighter CORS config for nginx
#
# Slightly tighter CORS config for nginx
#
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs
#
# Despite the W3C guidance suggesting that a list of origins can be passed as part of
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox)
# don't seem to play nicely with this.
#
@ojii
ojii / attack.py
Created October 12, 2012 23:40 — forked from FugiTech/attack.py
txircd load testing script using BeesWithMachineGuns (long-term join/quit test)
# -*- coding: utf-8 -*-
from twisted.internet import reactor, ssl
from twisted.internet.protocol import ClientFactory
from twisted.words.protocols.irc import IRCClient
import random, string
ATTACK, STANDBY = 0,1
QUIT_CHANCE = 10#%
JOIN_CHANCE = 80#%
@FugiTech
FugiTech / attack.py
Created October 10, 2012 15:19
txircd load testing script using BeesWithMachineGuns
# -*- coding: utf-8 -*-
from twisted.internet import reactor, ssl
from twisted.internet.protocol import ClientFactory
from twisted.words.protocols.irc import IRCClient
import random, string
def genMessage(low, high):
l = random.randint(low, high)
return "".join([random.choice(string.letters + string.digits + string.punctuation + ' ') for _ in xrange(l)])
@jacobian
jacobian / authuser.md
Created March 30, 2012 00:35
Upgrading auth.User - the profile approach

Upgrading auth.User - the profile approach

This proposal presents a "middle ground" approach to improving and refactoring auth.User, based around a new concept of "profiles". These profiles provide the main customization hook for the user model, but the user model itself stays concrete and cannot be replaced.

I call it a middle ground because it doesn't go as far as refactoring the whole auth app -- a laudable goal, but one that I believe will ultimately take far too long -- but goes a bit further than just fixing the most egregious errors (username length, for example).

This proposal includes a fair number of design decisions -- you're reading the fifth or sixth draft. To keep things clear, the options have been pruned out and on the one I think is the "winner" is still there. But see the FAQ at the end for some discussion and justification of various choices.

The User model

@beniwohli
beniwohli / gist:1173019
Created August 26, 2011 09:04
Sentry Example Config
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
@stefanfoulis
stefanfoulis / how_it_work.rst
Created July 19, 2011 07:06
An example nginx conf for mogilefs and gunicorn

Private media

Browser accesses URL of Application:

http://www.example.com/private_media/my_file.pdf

The Permissions are checked by the application backend. If Access is denied the application backend returns a 403 and thats the end of it.

@chrisglass
chrisglass / wisdom.txt
Created May 26, 2011 14:31
Engineering Wisdom
1. Knowledge is Power.
2. Time is Money.
As every engineer knows:
Power = Work / Time
Since:
Knowledge = Power
Time = Money