VB7QT9B
TF7NL!B
92N7DFR
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
iscp_protocol = Proto("ISCP", "ISCP protocol") | |
iscp_protocol.fields.header = ProtoField.bytes("iscp.header", "header") | |
iscp_protocol.fields.magic = ProtoField.string("iscp.magic", "magic") | |
iscp_protocol.fields.hsize = ProtoField.uint32("iscp.hsize", "hsize") | |
iscp_protocol.fields.dsize = ProtoField.uint32("iscp.dsize", "dsize") | |
iscp_protocol.fields.version = ProtoField.uint8("iscp.version", "version") | |
iscp_protocol.fields.payload = ProtoField.bytes("iscp.payload", "payload") | |
iscp_protocol.fields.start = ProtoField.char("iscp.start", "start") | |
iscp_protocol.fields.dest = ProtoField.char("iscp.dest", "dest") |
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/python3 | |
# This tool switches GNOME from one active monitor to the other connected | |
# monitor. | |
import dbus | |
bus = dbus.SessionBus() | |
display_config = dbus.Interface( | |
bus.get_object("org.gnome.Mutter.DisplayConfig", "/org/gnome/Mutter/DisplayConfig"), |
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
# Uni-T multimeter | |
# https://sigrok.org/wiki/Device_cables#UNI-T_UT-D04 | |
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="e008", MODE="0666", ATTR{power/level}="auto", ATTR{power/autosuspend}="0" |
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
sudo dpkg-divert --local --divert /usr/lib/mime/packages/unzip-disabled~ --rename /usr/lib/mime/packages/unzip | |
sudo update-mime | |
update-mime --local |
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
AT^U2DIAG=36 (Modem, UI, Application, NDIS) | |
(or AT^U2DIAG=40 with additional non-functional GPS port?) |
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 python | |
import argparse | |
import ast | |
import re | |
import sys | |
TS = 4 | |
def process_match(match): | |
col = 0 |
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
// TWP3 Protocol Parser | |
// | |
// Copy this file into your Microsoft Network Monitor Parser directory | |
// (usually My Documents\Network Monitor 3\Parsers) and include it in | |
// the `my_sparser.npl` file in the same directory, by adding the | |
// line "include "twp3.npl". Finally make sure that the latter file is | |
// part of your parser profile. | |
// Auto-detect TWP3, but don't mess with other HTTP requests | |
[RegisterAfter(TCPPayload.WSP, TWP3, Conversation.ThisIsTWP3 |
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.db.models.base import ModelBase | |
from django.utils.translation import get_language | |
from django.conf import settings | |
__all__ = ('Translate', 'LocalizeModelBase') | |
# a dummy placeholder object | |
Translate = object() | |
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 BootstrapFieldset(object): | |
""" Fieldset container. Renders to a <fieldset>. """ | |
def __init__(self, legend, *fields): | |
self.legend_html = legend and ('<legend>%s</legend>' % legend) or '' | |
self.fields = fields | |
def as_html(self, form): | |
return u'<fieldset>%s%s</fieldset>' % (self.legend_html, form.render_fields(self.fields), ) |
NewerOlder