Skip to content

Instantly share code, notes, and snippets.

View greglinch's full-sized avatar

Greg Linch greglinch

View GitHub Profile
@shymonk
shymonk / customize-save-in-django-admin-inline-form.org
Last active November 14, 2024 11:30
How to customize save in django admin inline form?

Customize Save In Django Admin Inline Form

Background

This is a common case in django ORM.

from django.db import models

class Author(models.Model):
@cmod
cmod / twitter_notifications_only.css
Created September 16, 2014 14:38
Twitter Notifications
/*
Just the Notifications, please
==============================
1. Make a Fluid (http://fluidapp.com/) instance of https://twitter.com/i/notifications
2. Apply the below CSS as a Userstyles stylesheet
3. Enjoy just the conversation, not the timeline
Why?
@cmod
cmod / minimal_fb_messenger.css
Last active July 2, 2024 13:32
Minimal Facebook Messenger for Fluid
/*
Minimal Facebook Messenger
==========================
1. Make a Fluid (http://fluidapp.com/) instance of https://facebook.com/messages/
1. a. (You need to buy the paid version of Fluid to modify UserStyles)
2. Apply the below CSS as a Userstyles stylesheet
3. Like magic, you can now message without all the cruft of Full Facebook
@gotoplanb
gotoplanb / testrail-508-html
Last active August 29, 2015 14:00
508 checklist
* [ ] A1: Do images that convey contextual content have equivalent alternative text specified in the alt attribute of the img element?
* [ ] A2: Do images that are purely decorative, and not contextual, have empty, or null, alternative text specified, e.g. alt=""?
* [ ] A3: Does the alternate text convey contextual relevance to the page it is on?
* [ ] A4: Do images that convey complex content have longdesc attributes or equivalent text content available elsewhere on the page?
* [ ] A5: Does text content contained in images disappear when images are not available, i.e. is there text contained in the images?
* [ ] A6: Do image map area elements have the link destination correctly titled? If the title attribute is used, it ought not to duplicate the alt text.
* [ ] A7: Do form non-text controls, e.g. input type image, provide a text alternative that identifies the purpose of the non-text control?
* [ ] A8: Do noframes elements have appropriate equivalent or alternative content for user agents that do not suppor
@ndarville
ndarville / webm.md
Last active March 11, 2025 17:21
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@salcode
salcode / .gitignore
Last active December 10, 2024 15:31
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@dwillis
dwillis / talks.md
Last active August 29, 2015 13:56
Lightning Talks NICAR 2014 Lineup
  1. Refactoring; or Why Your Code Sucks and How to Fix It, Christopher Groskopf
  2. A Few of My Favorite Wee Things, Lena Groeger
  3. Natural Language Processing in the kitchen, Anthony Pesce
  4. Five (more) algorithms in five (more) minutes, Chase Davis
  5. What we can learn from terrible data viz, Katie Park
  6. Practical Calculus, Steven Rich
  7. Detecting What Isn't There, Sisi Wei
  8. The whole internet in 5 minutes!, Jeremy Bowers
  9. How to Raise an Army, Tyler Fisher
  10. You Must Learn, Ben Welsh

This is my default career advice for people starting out in geo/GIS, especially remote sensing, adapted from a response to a letter in 2013.

I'm currently about to start a Geography degree at the University of [Redacted] at [Redacted] with a focus in GIS, and I've been finding that I have an interest in working with imagery. Obviously I should take Remote Sensing and other similar classes, but I'm the type of person who likes to self learn as well. So my question is this: What recommendations would you give to a student who is interested in working with imagery? Are there any self study paths that you could recommend?

I learned on my own and on the job, and there are a lot of important topics in GIS that I don’t know anything about, so I can’t give comprehensive advice. I haven’t arrived anywhere; I’m just ten minutes ahead in the convoy we’re both in. Take these recommendations critically.

Find interesting people. You’ll learn a lot more from a great professor (or mentor, or friend, or conference) o

@Stanback
Stanback / nginx.conf
Last active March 30, 2025 03:57 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which