Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
# | |
# by default, django 404 and 500 pages dont pass context to templates. | |
# as you almost *always* need context variables in your custom | |
# 404/500 templates, you might need MEDIA_URL for example | |
# | |
# you need to create a custom view for errors and register it in your urls.py | |
# | |
# in urls.py add : | |
# | |
# handler500 = handler404 = views.server_error |
$ git checkout master | |
Already on 'master' | |
$ django-admin.py migrate | |
Error: Cannot migrate in a dirty state | |
$ git commit -am "Added migration to remove blog entry's pub_month and pub_day fields." | |
$ django-admin.py tag_migration add_column_to_foo # tags a migration identifier using git-tag | |
$ django-admin.py migrate | |
last known sha: c39168d21bb27754737a1036a50f57687cf6ae56 | |
new migrations found between c39168..HEAD: |
#!/bin/bash | |
# Git post checkout hook. | |
# Reminds you of South migration changes when switching branches. | |
# Can be useful when you are when you are testing out a branch from | |
# someone else that requires migrations. | |
# Put the file in .git/hooks/post-checkout | |
PREVIOUS_HEAD=$1 | |
NEW_HEAD=$2 |
from django.core.cache import cache | |
from django.core.urlresolvers import reverse | |
from django.http import HttpRequest | |
from django.utils.cache import get_cache_key | |
def expire_page_cache(view, args=None): | |
""" | |
Removes cache created by cache_page functionality. | |
Parameters are used as they are in reverse() | |
""" |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"2.0.3",function($,L){ | |
//speak current webpage | |
//jhobbs 2013 | |
function stop(){ | |
speechSynthesis.cancel(); | |
} |
static OSStatus | |
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams, | |
uint8_t *signature, UInt16 signatureLen) | |
{ | |
OSStatus err; | |
SSLBuffer hashOut, hashCtx, clientRandom, serverRandom; | |
uint8_t hashes[SSL_SHA1_DIGEST_LEN + SSL_MD5_DIGEST_LEN]; | |
SSLBuffer signedHashes; | |
uint8_t *dataToSign; | |
size_t dataToSignLen; |