Skip to content

Instantly share code, notes, and snippets.

Amice13 /
Last active Jul 2, 2019
Запросы в CURL для данных Реестра избирателей
# Человекочитаемое описание результатов запроса здесь:!cm_core.cm_index?option=ext_static_page&ppg_id=262&pmn_id=161
# Получение данных про органы распорядителей и ведения Реестра избирателей
curl --header "Content-Type: text/xml;charset=UTF-8" --data "<soap:Envelope xmlns:soap=\"\" xmlns:drv=\"\"><soap:Header/><soap:Body><drv:GetOrgansService /></soap:Body></soap:Envelope>"
# Получение данных про избирательные округи
curl --header "Content-Type: text/xml;charset=UTF-8" --data "<soap:Envelope xmlns:soap=\"\" xmlns:drv=\"\"><soap:Header/><soap:Body><drv:GetAreas /></soap:Body></soap:Envelope>"
# Получение данных про избирательные участки. Необходимо менять параметр Area (получаются из сервиса GetAreas)
curl --header "Content-Type: text/xml;charse
ekwoodrich / DVRIP-Sonia Reference
Last active May 8, 2021
Reference codes for the DVRIP/Sonia TCP protocol used by the Net Surveillance ActiveX plugin
View DVRIP-Sonia Reference

DVRIP/Sonia Protocol

DVRIP/Sonia TCP protocol used by the Net Surveillance ActiveX plugin

1. Response Codes

Return code Definition
100 Success
101 Unknown error
102 Version not supported
103 Illegal request
mikoim /
Last active Oct 5, 2021
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)


Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

wschenk / Rakefile
Last active May 5, 2018
Download medium posts and convert to markdown
View Rakefile
require "upmark"
require 'csv'
require 'fileutils'
user = "wschenk"
workingdir = "medium"
outputdir = "articles"
def url( dest, source )
file dest do
import sys,json,base64,binascii
with open(sys.argv[1]) as fp:
def enc(data):
missing_padding = 4 - len(data) % 4
if missing_padding:
data += b'='* missing_padding
Belphemur / transmission-ssl
Last active Sep 18, 2021
Configuration to use nginx as reverse proxy for Transmission BT with SSL/HTTP2 protected with auth
View transmission-ssl
upstream transmission {
server; #Transmission
server {
listen 443 ssl http2;
auth_basic "Server Restricted";
auth_basic_user_file /var/www/myWebSite/web/.htpasswd;
# Path to the root of your installation
ryancdotorg /
Last active Aug 31, 2021
backdoored rsa key generation
#!/usr/bin/env python
import sys
import gmpy
import curve25519
from struct import pack
from hashlib import sha256
from binascii import hexlify, unhexlify
View gist:89011c5ac06553d5cdb8

A description of the PL2303HX USB protocol.

Control Transfers

Read Register

Read a device register value.

  • bmRequestType: IN, VENDOR, DEVICE
  • bRequest: 1
  • wValue: 80h | registerNumber
nocturnalgeek / MailinatorAliases
Last active Aug 7, 2021
A list of alternate domains that point to
View MailinatorAliases
lpereira / gist:c0bf3ca3148321395037
Created Jun 23, 2014
Integer to string conversion benchmark
View gist:c0bf3ca3148321395037
#include <chrono>
#include <cstdint>
#include <iostream>
#include <random>
#include <sstream>
using namespace std;
using namespace std::chrono;
const uint64_t P01 = 10;