Skip to content

Instantly share code, notes, and snippets.

from django.db import models
class Match(models.Model):
roundlimit = models.IntegerField()
scorelimit = models.IntegerField()
class Score(models.Model):
match = models.ForeignKey(Match, on_delete=models.PROTECT)
name = models.CharField(max_length=30)
score = models.IntegerField()
@TarCV
TarCV / FileContextMenuIcons.vbs
Created November 25, 2012 22:43
Script to add icons to explorer file context menus
Option Explicit
const HKEY_CLASSES_ROOT = &H80000000
const HKEY_LOCAL_MACHINE = &H80000002
const KEY_SET_VALUE = 2
Dim registry, hkey, classes_keys
Set registry=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
hkey = HKEY_LOCAL_MACHINE
const hkey_str = "HKEY_LOCAL_MACHINE"