Sometimes you want to ignore certain files when you run git diff, but you still want to check them
in, which means you can't capitalize on .gitignore.
This guide is here to help.
How to set it up?
| To change a field name in django 1.7+ | |
| 1. Edit the field name in the model (but remember the old field name: you need it for step 3!) | |
| 2. Create an empty migration | |
| $ python manage.py makemigrations --empty myApp | |
| 3. Edit the empty migration (it's in the migrations folder in your app folder, and will be the most recent migration) by adding | |
| migrations.RenameField('MyModel', 'old_field_name', 'new_field_name'), | |
| to the operations list. |
| class DisableMigrations(object): | |
| def __contains__(self, item): | |
| return True | |
| def __getitem__(self, item): | |
| return "notmigrations" | |
| MIGRATION_MODULES = DisableMigrations() |
04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.
This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.
[Laughter]
> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation
| Adding Hidden Agendas | |
| Adjusting Bell Curves | |
| Aesthesizing Industrial Areas | |
| Aligning Covariance Matrices | |
| Applying Feng Shui Shaders | |
| Applying Theatre Soda Layer | |
| Asserting Packed Exemplars | |
| Attempting to Lock Back-Buffer | |
| Binding Sapling Root System | |
| Breeding Fauna |
| #!/usr/bin/env python3 | |
| from collections import namedtuple | |
| import struct | |
| import Xlib.display | |
| class Edid: | |
| # Modified from the original source: https://github.com/jojonas/pyedid/blob/master/edid.py |
| CC=gcc | |
| CFLAGS=-Wall -O2 `pkg-config --cflags x11` | |
| LDFLAGS=`pkg-config --libs x11` | |
| SOURCES=toggle-decorations.c | |
| EXECUTABLE=$(patsubst %.c,%,$(SOURCES)) | |
| all: $(EXECUTABLE) | |
| clean: $(EXECUTABLE) |
| <?xml version="1.0"?> | |
| <!-- | |
| DualSense (DS5) USB HID Report Descriptor | |
| Documentation WIP | |
| TODO: Extract info from hid-playstation and cross-verify with us. | |
| --> |
| -- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
| create or replace function uuid_generate_v7() | |
| returns uuid | |
| as $$ | |
| begin | |
| -- use random v4 uuid as starting point (which has the same variant we need) | |
| -- then overlay timestamp | |
| -- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
| return encode( |
| #!/bin/bash | |
| gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |