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
@@ -28,7 +28,7 @@ | |
### Set diff-cmd to the absolute path of your 'diff' program. | |
### This will override the compile-time default, which is to use | |
### Subversion's internal diff implementation. | |
-# diff-cmd = diff_program (diff, gdiff, etc.) | |
+diff-cmd = colordiff | |
### Set diff3-cmd to the absolute path of your 'diff3' program. | |
### This will override the compile-time default, which is to use | |
### Subversion's internal diff3 implementation. |
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
# -*- coding: utf-8 -*- | |
#!/usr/bin/env python | |
""" | |
Model for microformat properties and parsers. A microformat parser can | |
parse an HTML element into a dictionary of properties, whose keys are | |
strings and whose values are strings or other dictionary of properties. | |
As an example, the main program of this script parses an hResume from | |
given URL. |
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
# -*- coding: utf-8 -*- | |
""" | |
Extremely fast Django test runner, based on the idea that your database schema | |
and fixtures are changed much more seldom that your code and tests. All you | |
need is to make sure that your "quickstart.sqlite" database file is always up | |
to date. | |
BEWARE: Don't run this test runner on production server. It assumes that you | |
use only one database configured as "default", and its db engine is SQLite. | |
Otherwise your tests can eat your data! |
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
#!/usr/bin/awk -f | |
# Convert the "svn log" output into a one liner format, which is easier to grep | |
# or use in scripts. Pipe "svn log" into this script | |
# When we get a line that starts with a revision number, put the data in variables | |
/^r[0-9]+/ { | |
rev=$1 | |
user=$3 | |
date=$5 |
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
To remove a submodule you need to: | |
Delete the relevant line from the .gitmodules file. | |
Delete the relevant section from .git/config. | |
Run git rm --cached path_to_submodule (no trailing slash). | |
Commit and delete the now untracked submodule files. |
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 django.shortcuts import render | |
class RestfulView(object): | |
allowed_methods = ["GET", "POST"] | |
def __call__(self, request, *args, **kwargs): | |
if request.method not in self.allowed_methods or not hasattr(self, request.method): | |
return self.method_not_allowed(request) | |
return getattr(self, request.method)(request, *args, **kwargs) |
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
# -*- coding: utf-8 -*- | |
import re | |
from django.shortcuts import redirect | |
PREF_VAR = 'ADMIN_PER_USER_PREF' | |
ORDER_VAR = 'o' | |
FILTER_TAIL = '__exact' | |
PATH = '/admin/storage/' |
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
uint8_t watchdog_count = 0; | |
ISR(WDT_vect) { | |
// This vector is for the watchdog timer | |
PORTA = PORTA | (1 << LED ); // The LED never goes on | |
++watchdog_count; | |
} | |
ISR(PCINT0_vect) | |
{ |
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 UserDict import IterableUserDict | |
import collections | |
__author__ = 'github.com/hangtwenty' | |
def tupperware(mapping): | |
""" Convert mappings to 'tupperwares' recursively. |
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
#include <stdio.h> | |
#include <string.h> | |
#include <inttypes.h> | |
// OLED hardware versions | |
#define OLED_V1 0x01 | |
#define OLED_V2 0x02 | |
// commands | |
#define LCD_CLEARDISPLAY 0x01 |
OlderNewer