Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / blockerList.json
Created June 25, 2015 00:05
Testing Safari Content Blocker on iMore.com
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*",
"resource-type": ["script"],
"load-type": ["third-party"],
"if-domain": ["imore.com"]
@jodytate
jodytate / shuffle trello cards
Last active August 29, 2015 14:22
shuffle trello
$('div.list div.list-card').sort(function(){
return Math.random()*10 > 5 ? 1 : -1;
}).each(function(){
var $t = $(this),
color = $t.attr('class');
$t.css({backgroundColor: color}).appendTo( $t.parent() );
});
@justinlittman
justinlittman / gist:f96230ab58588b6d164f
Last active February 16, 2017 18:56
Sample code for using SPARQL update to load VIVO.
from __future__ import division
from SPARQLWrapper import SPARQLWrapper
import socket
import codecs
import os
import time
from namespace import ns_manager
from rdflib import Graph
import math
@poritsky
poritsky / Pinboard Mod 2015.css
Created January 26, 2015 19:56
Just a modification for Pinboard.in, inspired by Brett Terpstra. Works best on OS X.
@font-face{font-family:'FontAwesome';src:url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.eot?v=4.2.0');src:url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'),url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}
#tag_cloud{display:none}
#timer{display:none;}
#logo{margin-left:120px;}
#pinboard{width:100%;padding:0 !important;margin:0 !important;background-color:#f9f9f9 !important;}
#banner{background:rgb(15,128,255) !important;width:100% !important;min-width:1100px;position:fixed;left:0;padding:15px 0 16px 0 !important;z-index:10;font-family:"Avenir Next Condensed";}
#
@jamesbrobb
jamesbrobb / multiform.py
Last active July 4, 2023 18:53 — forked from michelts/gist:1029336
django multiform mixin and view that allows the submission of a) All forms b) Grouped forms c) An individual form
class MultiFormMixin(ContextMixin):
form_classes = {}
prefixes = {}
success_urls = {}
grouped_forms = {}
initial = {}
prefix = None
success_url = None
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@Nagyman
Nagyman / workflows-in-django.md
Last active January 27, 2024 08:29
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)
@hellosteadman
hellosteadman / twopy.py
Created March 4, 2014 09:59
Add your Twitter friends' RSS feeds to a single OPML file
"""
This script requires the following Packages
1: Twitter: https://pypi.python.org/pypi/twitter
2: PyQuery: https://pypi.python.org/pypi/pyquery
3: Jinja2: https://pypi.python.org/pypi/Jinja2
It's fairly primitive but works. It uses a Jinja2 template to create an OPML
file from the RSS feeds of the websites run by the people you follow on
Twitter.
@mlgill
mlgill / DropboxSync.py
Last active February 12, 2019 18:11 — forked from wrenoud/DropboxSync.py
DropboxSync: iOS (Pythonista), synchronizes all files to/from Dropbox directory
import os, sys, pickle, console, re
sys.path += ['lib']
import dropboxsetup
# dropbox_sync
# by Michelle L. Gill, michelle@michellelynngill.com
# requires my dropboxsetup module (https://gist.github.com/8311046)
# Change log