Skip to content

Instantly share code, notes, and snippets.

@Amice13
Amice13 / drv_curl_examples.sh
Last active Jul 2, 2019
Запросы в CURL для данных Реестра избирателей
View drv_curl_examples.sh
# Человекочитаемое описание результатов запроса здесь: https://www.drv.gov.ua/ords/portal/!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=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:drv=\"http://www.drv.gov.ua/\"><soap:Header/><soap:Body><drv:GetOrgansService /></soap:Body></soap:Envelope>" https://www.drv.gov.ua/ords/svc/personal/API/Opendata
# Получение данных про избирательные округи
curl --header "Content-Type: text/xml;charset=UTF-8" --data "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:drv=\"http://www.drv.gov.ua/\"><soap:Header/><soap:Body><drv:GetAreas /></soap:Body></soap:Envelope>" https://www.drv.gov.ua/ords/svc/personal/API/Opendata
# Получение данных про избирательные участки. Необходимо менять параметр Area (получаются из сервиса GetAreas)
curl --header "Content-Type: text/xml;charse
@ekwoodrich
ekwoodrich / DVRIP-Sonia Reference Codes.md
Last active May 8, 2021
Reference codes for the DVRIP/Sonia TCP protocol used by the Net Surveillance ActiveX plugin
View DVRIP-Sonia Reference Codes.md

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
mikoim / README.md
Last active Oct 5, 2021
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)
View README.md

Parameters

Container: MP4

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

Video codec: H.264

@wschenk
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
View conv.py
#!/usr/bin/python
import sys,json,base64,binascii
with open(sys.argv[1]) as fp:
pkey=json.load(fp)
def enc(data):
missing_padding = 4 - len(data) % 4
if missing_padding:
data += b'='* missing_padding
@Belphemur
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 127.0.0.1:9091; #Transmission
}
server {
listen 443 ssl http2;
server_name example.com;
auth_basic "Server Restricted";
auth_basic_user_file /var/www/myWebSite/web/.htpasswd;
# Path to the root of your installation
@ryancdotorg
ryancdotorg / rsabd.py
Last active Aug 31, 2021
backdoored rsa key generation
View rsabd.py
#!/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
nocturnalgeek / MailinatorAliases
Last active Aug 7, 2021
A list of alternate domains that point to @mailinator.com
View MailinatorAliases
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com
@lpereira
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;