Skip to content

Instantly share code, notes, and snippets.

View Schamper's full-sized avatar

Erik Schamper Schamper

View GitHub Profile
@Schamper
Schamper / cit.py
Created April 8, 2022 11:38
Reference CIT parser
#!/usr/bin/env python3
import array
import argparse
import io
import struct
import sys
from binascii import crc32
from datetime import datetime, timedelta, timezone
try:
class MessageMixin(object):
def __getattr__(self, name):
field = self.__getnestedattr(name)
if field:
return getattr(field, name)
super(Message, self).__getattribute__(name)
def __setattr__(self, name, value):
class Message(object):
def __init__(self, header, unprotected_payload, protected_payload):
self.header = header
self.unprotected_payload = unprotected_payload
self.protected_payload = protected_payload
class MessageHeader(CStruct):
cmd = CUShort()
unprotected_len = CShort()
protected_len = CShort()
18/11 21:34 [6888] - warn: NodeBB Setup Aborted.
Error: [[user:change_password_error_length]]
at Object.User.isPasswordValid (E:\Development\Node\NodeBB\src\user\create.js:186:20)
at async.parallel.passwordValid (E:\Development\Node\NodeBB\src\user\create.js:158:11)
at E:\Development\Node\NodeBB\node_modules\async\lib\async.js:689:13
at E:\Development\Node\NodeBB\node_modules\async\lib\async.js:239:13
at E:\Development\Node\NodeBB\node_modules\async\lib\async.js:119:13
at _arrayEach (E:\Development\Node\NodeBB\node_modules\async\lib\async.js:91:13)
at _forEachOf (E:\Development\Node\NodeBB\node_modules\async\lib\async.js:118:9)
at _each (E:\Development\Node\NodeBB\node_modules\async\lib\async.js:83:13)
E:\Development\Node\NodeBB>node app.js setup
18/11 19:17 [12804] - info: NodeBB v0.9.0 Copyright (C) 2013-2014 NodeBB Inc.
18/11 19:17 [12804] - info: This program comes with ABSOLUTELY NO WARRANTY.
18/11 19:17 [12804] - info: This is free software, and you are welcome to redistribute it under certain conditions.
18/11 19:17 [12804] - info:
18/11 19:17 [12804] - info: Launching web installer on port 4567
18/11 19:17 [12804] - info: Web installer listening on http://0.0.0.0:4567
18/11 19:17 [10032] - info: NodeBB Setup Triggered via Command Line
Welcome to NodeBB!
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!-- Font icons are to be in the titleCondensed field -->
<!--<item-->
<!--android:id="@+id/action_search"-->
<!--android:title="@string/action_search"-->
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// We want custom views for our ActionButtons and this is probably the best method
// It requires a bunch of complicated undocumented stuff but it's compatible with menu xml files
// Create a new MenuBuilder for our custom menu
// The menu that the Toolbar gives us with mToolbar.getMenu() has additional presenters we don't want
// Same with the menu from the ActionMenuView
MenuBuilder mb = new MenuBuilder(this);
// Automatically generated configuration file for 'Hyperion daemon'
// Generated by: HyperCon (The Hyperion deamon configuration file builder
{
/// Device configuration contains the following fields:
/// * 'name' : The user friendly name of the device (only used for display purposes)
/// * 'type' : The type of the device or leds (known types for now are 'ws2801', 'ldp8806',
/// 'lpd6803', 'sedu', 'adalight', 'lightpack', 'test' and 'none')
/// * 'output' : The output specification depends on selected device. This can for example be the
/// device specifier, device serial number, or the output file name
equalCount :: String -> String -> String
equalCount xs ys = map head [x | x <- group (quicksort xs), x `elem` group (quicksort ys)]
where
group [] = []
group (z:zs) =
let (as, bs) = span (== z) zs
in (z:as) : group bs
<input type="number" class="form-control" id="maxPollOptions" placeholder="10" min="1" max="100" data-key="limits.maxOptions">