Skip to content

Instantly share code, notes, and snippets.

View wsvincent's full-sized avatar

Will Vincent wsvincent

View GitHub Profile
@wsvincent
wsvincent / gist:3a026e06c98ff1138b1986eee9b3636a
Last active October 9, 2025 17:09
Copilot CLI prompts in lib/copilot/index.js
You are an expert in knowledge management and are a component of GitHub Copilot coding agent.
Your task is to consolidate the following into a single collection of non - redundant, high quality facts that can be used to help with future coding tasks across the repository.
- Facts that are redundant or very similar should be combined and rephrased into a single coherent fact.
- Facts that are outdated should be removed.
Think through each decision silently; only output a valid JSON object for each fact, each on its own separate line, in the following format.
Do not include any other text in your response, no markdown, no newlines or unnecessary whitespace.
You are an expert in knowledge management and are a component of GitHub Copilot coding agent.
Your task is to consider the given facts and use them to answer the question.
@wsvincent
wsvincent / django-top-100.py
Last active May 15, 2025 07:57
Top 100 Django Packages by PyPI Downloads
"""
$ wget https://hugovk.github.io/top-pypi-packages/top-pypi-packages-30-days.json
$ python django-top-100.py
"""
import json
from pathlib import Path
@wsvincent
wsvincent / tests.yaml
Created October 27, 2023 23:42
GitHub Actions CI
name: Continuous Integration
on:
- push
- pull_request
jobs:
test:
name: Run Python/Django Tests
runs-on: ubuntu-latest
@wsvincent
wsvincent / _base.html
Created July 9, 2020 18:49
LearnDjango.com OG stuff
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}LearnDjango{% endblock title %} | LearnDjango.com</title>
<meta name="author" content="Learn Django">
<meta name="description" content="{% block description %}Tutorials and courses on web development with Python and the Django Web Framework. {% endblock description %}">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,
shrink-to-fit=no">
version: '3.7'
services:
web:
build: .
command: python /code/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- 8000:8000
@wsvincent
wsvincent / admin.py
Created November 2, 2018 19:23
Django Custom User Model for any new project
# users/admin.py
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm, CustomUserChangeForm
from .models import CustomUser
class CustomUserAdmin(UserAdmin):
add_form = CustomUserCreationForm
@wsvincent
wsvincent / course_detail.html
Last active July 26, 2018 18:54
Django slugs ex w/in a "courses" app
{% extends 'base.html' %}
{% block content %}
<div class="container">
<h2>{{ object.title }}</h2>
<p>Author: {{ object.author}}</p>
<p>Description: {{ object.description }}</p>
<p>Sections:</p>
<ul>
{% for section in course.sections.all %}
import csv
from school.models import Zipcode
def import_us_population():
for csvfile in (
'school_data/us_population_2014.csv',
):
with open(csvfile, 'rU') as csvinput:
@wsvincent
wsvincent / permutations.js
Created April 28, 2017 17:16
Permutations in JavaScript
// notes on this discussion from http://stackoverflow.com/questions/9960908/permutations-in-javascript
@wsvincent
wsvincent / hello.py
Created December 16, 2016 21:49
Python3
print("Hi Haya");