This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - Find Boost | |
# | |
# Based on https://gist.github.com/thiagowfx/970e3931387ed7db9a39709a8a130ee9 Copyright (c) 2016 Thiago Barroso Perrotta | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of | |
# this software and associated documentation files (the "Software"), to deal in | |
# the Software without restriction, including without limitation the rights to | |
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
# the Software, and to permit persons to whom the Software is furnished to do so, | |
# subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import pygame | |
from pygame.locals import * | |
def main(): | |
srf = pygame.display.set_mode((640,480)) | |
while True: | |
for event in pygame.event.get(): | |
if event.type == pygame.QUIT: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
BASE=/etc/hostenvs/ | |
function usage { | |
echo "Usage: $0 <environment>" | |
echo | |
echo "<environment> is the name of a file in ${BASE} to be symlinked to /etc/hosts." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<defaultDocument> | |
<files> | |
<remove value="iisstart.htm" /> | |
<remove value="Default.htm" /> | |
<remove value="Default.asp" /> | |
<add value="index.php" /> | |
</files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
countries = [ | |
{'capital': 'Andorra la Vella', | |
'code': 'AD', | |
'continent': 'Europe', | |
'intermediate_region_code': '', | |
'intermediate_region_name': '', | |
'iso3': 'AND', | |
'm49': '020', | |
'name': 'Andorra', | |
'region_code': '150', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from django.contrib import admin | |
from django.contrib.auth.models import Group | |
from django.contrib.auth.admin import UserAdmin | |
from django.contrib.auth.forms import ReadOnlyPasswordHashField | |
from .models import * | |
class UserCreationForm(forms.ModelForm): | |
"""A form for creating new users. Includes all the required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
from django.db import models | |
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser | |
class CustomUserManager(BaseUserManager): | |
def create_user(self, email, username, date_of_birth, password=None): | |
""" | |
Creates and saves a User with the given email, date of | |
birth and password. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "symfony/framework-standard-edition", | |
"license": "MIT", | |
"type": "project", | |
"description": "The \"Symfony Standard Edition\" distribution", | |
"autoload": { | |
"psr-0": { "": "src/" } | |
}, | |
"require": { | |
"php": ">=5.3.3", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "symfony/framework-standard-edition", | |
"license": "MIT", | |
"type": "project", | |
"description": "The \"Symfony Standard Edition\" distribution", | |
"autoload": { | |
"psr-0": { "": "src/" } | |
}, | |
"require": { | |
"php": ">=5.3.3", |