most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| """ | |
| An alternative Django ``TEST_RUNNER`` which uses unittest2 test discovery from | |
| a base path specified in settings, rather than requiring all tests to be in | |
| ``tests`` module of an app. | |
| If you just run ``./manage.py test``, it'll discover and run all tests | |
| underneath the ``TEST_DISCOVERY_ROOT`` setting (a path). If you run | |
| ``./manage.py test full.dotted.path.to.test_module``, it'll run the tests in | |
| that module (you can also pass multiple modules). |
| """ | |
| This module provides very simple Django middleware that sleeps on every request. | |
| This is useful when you want to simulate slow response times (as might be | |
| encountered, say, on a cell network). | |
| To use, add this middleware, and add a value for SLEEP_TIME to your settings. | |
| Possible future feature: Look for an X-Django-Sleep header on each request, | |
| to let the client specify per-request sleep time. |
| # Rake Quick Reference | |
| # by Greg Houston | |
| # http://ghouston.blogspot.com/2008/07/rake-quick-reference.html | |
| # ----------------------------------------------------------------------------- | |
| # Running Rake | |
| # ----------------------------------------------------------------------------- | |
| # running rake from the command-line: | |
| # rake --help |
| require "rubygems" | |
| require "json" | |
| require "net/http" | |
| require "uri" | |
| uri = URI.parse("http://api.sejmometr.pl/posiedzenia/BZfWZ/projekty") | |
| http = Net::HTTP.new(uri.host, uri.port) | |
| request = Net::HTTP::Get.new(uri.request_uri) |
| # -*- coding: utf-8 -*- | |
| from django import forms | |
| from crispy_forms.helper import FormHelper | |
| from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field | |
| from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions | |
| class MessageForm(forms.Form): | |
| text_input = forms.CharField() |
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query stringUsing Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"