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
""" | |
A drop-in replacement to make PyBrowserID[1] | |
use cryptography.io instead of M2Crypto. | |
Replace browserid/crypto/fallback.py with this file, | |
or monkey-patch browserid.crypto.{Key,RSKey,DSKey}, | |
or whatever. The choice of dirtiness is up to you. | |
Use with caution. I'm no cryptographer. |
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
# Quick-and-dirty fix for forms using ModelChoiceField with to_field_name set. | |
# See https://code.djangoproject.com/ticket/20202 for details. | |
# Example usage: | |
# >>> import form_fixes | |
# >>> form_fixes.fix_to_field_name() | |
from django import forms | |
from django.db import models |
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
/* Example: MELT MT10T7-7 LCD display, directly connected to Arduino. | |
* Display datasheet: http://www.melt.com.ru/docs/MT-10T7_8_9.pdf | |
*/ | |
// Other pins: GND to GND; +E to 5V; V0, +L and -L are not necessary for example purposes. | |
#define PIN_WR1 3 | |
#define PIN_WR2 2 | |
#define PIN_A0 13 | |
#define PIN_DB0 9 | |
#define PIN_DB1 10 |
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
#!/bin/sh | |
# What's this | |
# ----------- | |
# CUPS backend wrapper for Canon LBP-810 and LBP-1120 FOSS driver. | |
# Works for me with LBP-1120 on Ubuntu 12.04. | |
# | |
# Because I don't want a kludge with dummy serial:/dev/ttyS0 backend, | |
# as everyone on the 'net seem to suggest. That never worked for me. | |
# Nor I want to use Canon proprietary ccpd daemon, which frequently |
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
--- rp-pppoe-3.8/src/pppoe-server.c 2010-07-15 16:42:39.031057949 +0400 | |
+++ rp-pppoe-3.8/src/pppoe-server.c 2010-07-15 16:48:14.078605821 +0400 | |
@@ -97,6 +97,7 @@ | |
#define MAX_SERVICE_NAMES 64 | |
static int NumServiceNames = 0; | |
static char const *ServiceNames[MAX_SERVICE_NAMES]; | |
+static int ReactionOnNoServiceName = 1; | |
PppoeSessionFunctionTable DefaultSessionFunctionTable = { | |
PppoeStopSession, |
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
// types.js | |
// ... | |
var parseByteA = function(val) { | |
// Step 1: Find binary data length (and validate data) | |
var length = 0; | |
for (var i = 0; i < val.length; i++) { | |
if (val[i] == "\\") { | |
if (i >= val.length - 1) | |
throw "Invalid bytea encoding: '\\' at the end"; |
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 <netdb.h> | |
#include <stdio.h> | |
#include <string.h> | |
int main(void) { | |
struct addrinfo hints, *ai; | |
char buf[INET6_ADDRSTRLEN]; | |
int ret; | |
/* |
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
--- drivers/net/ppp/ppp_generic.c 2014-01-20 06:40:07.000000000 +0400 | |
+++ drivers/net/ppp/ppp_generic.c 2014-06-09 14:48:48.000000000 +0400 | |
@@ -54,6 +54,13 @@ | |
#include <net/net_namespace.h> | |
#include <net/netns/generic.h> | |
+#define CONFIG_PPP_FILTER_COUNTERS 1 | |
+ | |
+#ifdef CONFIG_PPP_FILTER_COUNTERS | |
+#include <linux/proc_fs.h> |
NewerOlder