This file contains hidden or 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
! grok.com: Hide animations and transitions (e.g., for widgets) | |
grok.com##* { animation: none !important; transition: none !important; } | |
! grok.com: Hide CPU consuming "space" idle screensaver (moving stars) | |
grok.com##.absolute.top-0.left-0.w-full.h-full > canvas | |
! grok.com: Less specific screensaver hiding (might hide charts or graphics) | |
!grok.com##canvas |
This file contains hidden or 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
-- Adds "Open with iTerm" action in Finder right-click context menu | |
-- If a file is selected, it navigates to its parent folder and outputs the file type | |
-- If a folder is selected, it navigates to that folder | |
on run {input, parameters} | |
-- Message printed in new iTerm tab | |
set finderMessage to "\\033[3m~~~ Opened by Finder ~~~\\033[0m" | |
-- Get the first selected item (file or folder) | |
set theItem to item 1 of input |
This file contains hidden or 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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains hidden or 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
/* | |
* Simple example that shows how to set the requested Twitter access | |
* permissions on a per-user basis. | |
* | |
* For example, this is useful if you only require Direct Message permissions | |
* from a few users and simple read access for the rest. | |
* | |
* 1. Set up your application to request R/W/DM by default in | |
* the app settings (https://dev.twitter.com/apps/) | |
* 2. Set the OAUTH_KEY and OAUTH_SECRET environment variables and start this server. |
This file contains hidden or 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 MyGeoResource(Resource): | |
def apply_sorting(self, objects, options=None): | |
if options and "longitude" in options and "latitude" in options: | |
return objects.distance(Point(options['latitude'], options['longitude'])).order_by('distance') | |
return super(MyGeoResource, self).apply_sorting(objects, options) | |
This file contains hidden or 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
### | |
### Bindings | |
### | |
unbind C-b | |
set -g prefix C-a | |
bind a send-prefix | |
# URL viewing | |
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; run-shell "xterm -e 'cat /tmp/tmux-buffer | urlview'" |
This file contains hidden or 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 <app_name>.models import Foo | |
# ... | |
# Using the default admin interface: | |
admin.site.register(Foo) |
This file contains hidden or 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 django.contrib import admin | |
from myapp.models import Foo | |
from myapp.forms import FooForm | |
class FooAdmin(admin.ModelAdmin): | |
form = FooForm | |
prepopulated_fields = { 'slug': ['title'] } |