Skip to content

Instantly share code, notes, and snippets.

View remccormick's full-sized avatar

Rob McCormick remccormick

View GitHub Profile
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not PEP8-cheatsheet.py
@remccormick
remccormick / profile.ps1
Created November 20, 2019 21:38 — forked from timsneath/profile.ps1
PowerShell template profile: adds some useful aliases and functions
### PowerShell template profile
### Version 1.03 - Tim Sneath <tim@sneath.org>
### From https://gist.github.com/timsneath/19867b12eee7fd5af2ba
###
### This file should be stored in $PROFILE.CurrentUserAllHosts
### If $PROFILE.CurrentUserAllHosts doesn't exist, you can make one with the following:
### PS> New-Item $PROFILE.CurrentUserAllHosts -ItemType File -Force
### This will create the file and the containing subdirectory if it doesn't already
###
### As a reminder, to enable unsigned script execution of local scripts on client Windows,
@remccormick
remccormick / A_Profile_Goco.ps1
Created November 20, 2019 21:37 — forked from i-e-b/A_Profile_BJSS.ps1
My sample Powershell profile script
Set-PSReadlineOption -BellStyle None
Import-Module 'C:\Gits\posh-git\src\posh-git.psd1'
set-executionpolicy Unrestricted process
$baseDir = Split-Path -parent $MyInvocation.MyCommand.Definition
#. "$baseDir\hand.ps1"
# General actions
function edit ($file) { & "${env:ProgramFiles(x86)}\Notepad++\notepad++.exe" $file }
function vim () { & "${env:ProgramFiles}\Vim\vim80\gvim.exe" $args }
@remccormick
remccormick / leave_your_inhibitions_at_the_database.md
Created September 17, 2019 18:51 — forked from reginafcompton/leave_your_inhibitions_at_the_database.md
Leave Your Inhibitions at the Database Connection

The Django ORM

# models.py

from django.db import models

class Pasta(models.Model):
    name = models.CharField(max_length=200)
    price_per_pound = models.DecimalField(decimal_places=2)