Skip to content

Instantly share code, notes, and snippets.

View wesvetter's full-sized avatar
coffee plz

Wes Vetter wesvetter

coffee plz
View GitHub Profile
@friggeri
friggeri / haiku
Created October 6, 2011 07:30
random heroku-like name generator
haiku = ->
adjs = [
"autumn", "hidden", "bitter", "misty", "silent", "empty", "dry", "dark",
"summer", "icy", "delicate", "quiet", "white", "cool", "spring", "winter",
"patient", "twilight", "dawn", "crimson", "wispy", "weathered", "blue",
"billowing", "broken", "cold", "damp", "falling", "frosty", "green",
"long", "late", "lingering", "bold", "little", "morning", "muddy", "old",
"red", "rough", "still", "small", "sparkling", "throbbing", "shy",
"wandering", "withered", "wild", "black", "young", "holy", "solitary",
"fragrant", "aged", "snowy", "proud", "floral", "restless", "divine",
@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active May 20, 2025 07:59
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@marteinn
marteinn / external_tastypie_serialization.py
Last active August 29, 2015 14:00
How to use Tastypies resource serialization outside the api
"""
Credit to the parker library (https://github.com/coxmediagroup/parker/) and their TastyPieHandler.
"""
req = HttpRequest()
resource = YourResource()
bundle = resource.build_bundle(obj=your_model)
bundle = resource.full_dehydrate(bundle)
bundle = resource.alter_detail_data_to_serialize(req, bundle)
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug

How do I do this thing?

I'm not aware of how to use Google, how do I do this basic thing in Language X?

tagged coding, question

edited by Grammar Nazi (2.5M), asked by 1337z0r (2)

Answer 1 (12)

@PurpleBooth
PurpleBooth / README-Template.md
Last active June 18, 2025 21:40
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@fredbenenson
fredbenenson / kickstarter_sql_style_guide.md
Last active May 22, 2025 23:58
Kickstarter SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

@ovcharik
ovcharik / grunt-browserify-persistent-cache.coffee
Last active May 4, 2016 20:18
Persistent cache for grunt browserify
fs = require 'fs'
# Structure of cache file:
#
# {
# "path/to/output/file/1": {
# "cache": {
# "path/to/source/file/1": {
# "size" : <file size>,
# "mtime": <file modified time in ms>,
@romdim
romdim / datepicker.coffee
Last active October 5, 2018 21:34 — forked from kdimatteo/datepicker.js
Backbone-Forms implementation of Bootstrap DatePicker
###*
# Bootstrap Datepicker for Backbone.Forms
#
# Quick editor to create a Bootstrap style datepicker (instead of multiple of dropdowns)
# @see: https://github.com/eternicode/bootstrap-datepicker/
# @usage: takes 5 optional schema options: format, minViewMode, autoclose, clearBtn and endDate
# Forked because I wanted to use only years as shown in the example below
schema:
MyDate:
type: "DatePicker"
"""
Logical deletion for Django models. Uses is_void flag
to hide discarded items from queries. Overrides delete
methods to set flag and soft-delete instead of removing
rows from the database.
"""
from django.apps import apps
from django.contrib.admin.utils import NestedObjects
from django.db import models
from django.db.models import signals