Skip to content

Instantly share code, notes, and snippets.

@667bdrm
667bdrm / build-packages.php
Created January 14, 2012 15:28
Drupal package builer with optional upload to SourceForge
#!/bin/sh
BRANCHES="7.x-2.x 6.x-2.x 7.x-1.x 6.x-1.x"
LIBBRANCHES="2.x"
export NODE_PATH=/usr/lib/node_modules
if [ ! -d "elfinder" ] ; then
git clone http://git.drupal.org/project/elfinder.git
cd elfinder
for i in $BRANCHES
@667bdrm
667bdrm / dvr-alarm-server.pl
Last active May 16, 2021 17:43
Chinese DVR Alarm Server
#!/usr/bin/perl
#
# Simple log/alarm server receiving and printing to console remote dvr/camera events.
# future releases at https://gitlab.com/667bdrm/sofiactl
# Tested with:
#
# HJCCTV HJ-H4808BW
# http://www.aliexpress.com/item/Hybird-NVR-8chs-H-264DVR-8chs-onvif-2-3-Economical-DVR-8ch-Video-4-AUDIO-AND/1918734952.html
#
@667bdrm
667bdrm / caronline.pl
Created April 30, 2015 17:32
car-online.ru vehicle tracking service data to gpx converter / openstreetmap uploader
#!/usr/bin/perl
#
# caronline.pl
#
# car-online.ru data to gpx converter / openstreetmap uploader
#
# (c) 2009, https://gist.github.com/667bdrm
#
@667bdrm
667bdrm / cityguide-jam-downloader.pl
Created April 30, 2015 17:53
CityGuide jam service updates downloader (incomplete)
#!/usr/bin/perl
$CG_HOST = 'service.probki.net';
$CG_PORT = 1961;
# DK01 - 2.2 PC
# DK03 - 3.x-3.4 PPC
# DK04 - Dispatcher 1.1.35, 3.5 PPC
# DK05 - Licensing service, Dispatcher
my $PROG_PROTO = "DK03";
@667bdrm
667bdrm / cityguide-jam-service-emulator.pl
Created April 30, 2015 17:56
CityGuide jam service emulator (incomplete)
#!/usr/bin/perl
use IO::Socket;
use IO::Socket::INET;
use Sys::Syslog;
use Sys::Syslog qw(:DEFAULT setlogsock);
use Sys::Syslog qw(:standard :macros);
use Time::Local;
setlogsock("console");
@667bdrm
667bdrm / parser.rb
Last active October 22, 2015 19:35
betsbc.com results to xlsx converter
# encoding: UTF-8
require 'rubygems'
require 'net/http'
require 'uri'
require 'nokogiri'
require 'open-uri'
require 'axlsx'
$toto_base = "http://betsbc.com/toto/"
@667bdrm
667bdrm / ipcam-clock-set.pl
Last active September 10, 2022 16:54
Simple clock synchronization for some chinese DVRs supporting CMS with json-like protocol. Includes some other API commands. Fork at https://gitlab.com/667bdrm/sofiactl
#!/usr/bin/perl
# latest release at https://gitlab.com/667bdrm/sofiactl
#
# Simple clock synchronization for some chinese HiSilicon based DVRs supporting CMS (Sofia software) with json-like protocol. Tested with:
#
# HJCCTV HJ-H4808BW (XiongMai, Hi3520, MBD6304T)
# http://www.aliexpress.com/item/Hybird-NVR-8chs-H-264DVR-8chs-onvif-2-3-Economical-DVR-8ch-Video-4-AUDIO-AND/1918734952.html
#
#
@667bdrm
667bdrm / ipcptz.pl
Last active May 10, 2020 19:15
PTZ control tool and generic SDK for Huamai PTZ camera 5508N-W-IR (eye10000.com)
#!/usr/bin/perl
# PTZ control tool and generic SDK for Huamai PTZ camera 5508N-W-IR (eye10000.com)
# http://www.aliexpress.com/item/New-IR-wireless-ip-camera-with-P2P-H-264-PTZ-WIFI-SD-Slot-Network-camera-Free/782606869.html
#
# Future releases will be available at https://gitlab.com/667bdrm/huamaictl
#
# Usage:
#
# ipcptz.pl --host <ip> --port <port> --authserial <serial> --authtime <time> --authtoken <token> --direction <up|down|left|right|patrol|zoomin|zoomout> --speed <speed>
@667bdrm
667bdrm / dvr_netviewer.ksy
Last active May 4, 2020 23:39
Xinshijia NetViewer_DN.exe application network protocol specification (default port 9000)
meta:
id: xsj_netviewer
file-extension: xsj_netviewer
endian: be
seq:
- id: netviewer_packet
type: netviewer_packet
repeat: eos
doc: >
port 9000
@667bdrm
667bdrm / 3proxy-tor-radius.cfg
Last active April 29, 2018 19:55
3proxy 0.9+ socks proxy configuration with tor and radius authentication support
scache 65536
nserver 1.1.1.1
config /conf/3proxy.cfg
monitor /conf/3proxy.cfg
log /logs/3proxy-%y%m%d.log D
rotate 60
counter /count/3proxy.3cf