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!
\
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"action": { | |
"type": "block" | |
}, | |
"trigger": { | |
"url-filter": ".*", | |
"resource-type": ["script"], | |
"load-type": ["third-party"], | |
"if-domain": ["imore.com"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('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() ); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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";} | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MultiFormMixin(ContextMixin): | |
form_classes = {} | |
prefixes = {} | |
success_urls = {} | |
grouped_forms = {} | |
initial = {} | |
prefix = None | |
success_url = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 / { |
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.
- Publishing (Draft->Approved->Published->Expired->Deleted)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |