Skip to content

Instantly share code, notes, and snippets.

View ushkinaz's full-sized avatar

Dmitry Sidorenko ushkinaz

  • Antalya
View GitHub Profile
@ushkinaz
ushkinaz / TLS12Test.java
Created November 23, 2017 15:38
TLS v1.2 test
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
public class TLS12Test {
public TLS12Test() {
}
@ushkinaz
ushkinaz / ddns-start.sh
Created November 11, 2017 20:48
nsupdate.info DDNS update script for asuswrt-merlin
#!/usr/bin/env sh
# nsupdate.info DDNS update script for asuswrt-merlin
# See
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS
# http://nsupdateinfo.readthedocs.io/en/
# Location: /jffs/scripts/ddns-start
DOMAIN="domain.nsupdate.info"
TOKEN="token"
@ushkinaz
ushkinaz / syncthing-relay
Created October 24, 2017 19:34
Syncthing Relay Systemd Service
#/etc/default/syncthing-relay
KEYS=/etc/relaysrv
GLOBAL_RATE=10485760
PER_SESSION_RATE=212992
PROVIDED_BY='https://keybase.io/ushkinaz'
@ushkinaz
ushkinaz / bootstrap.sh
Last active October 26, 2017 16:15
Bootstrapping new Ubuntu/Debian
# Repos
sudo add-apt-repository ppa:webupd8team/java
sudo add-apt-repository ppa:git-core/ppa
# Basic tools
sudo apt install mc htop lnav git zsh etckeeper tmux httpie pv most
sudo apt install oracle-java8-installer
# gui
@ushkinaz
ushkinaz / days.sql
Created January 10, 2017 14:04
Generates a table with dates
-- Generates a table with dates,
-- "duration" - number of days
-- "days_ago" - start day
WITH params AS (SELECT
40 AS days_ago,
10 AS duration
FROM dual)
SELECT
LEVEL,
to_date(to_char(SYSDATE - LEVEL - params.days_ago, 'DD-MM-YYYY'), 'DD-MM-YYYY')

Тулы

Терминал

zsh - Умный bash

mosh - Умный, мобильный и быстрый ssh

tmux - Сессии для ssh, мультиплексор терминалов

Keybase proof

I hereby claim:

  • I am ushkinaz on github.
  • I am ushkinaz (https://keybase.io/ushkinaz) on keybase.
  • I have a public key ASBr9MakcsOO0jNqOa8aoaXRrBvq9-lnXyRah8gQYf2HpAo

To claim this, I am signing this object:

#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
# Modified for simplified checking by Yonathan Klijnsma
import sys
import struct
import socket
@ushkinaz
ushkinaz / roses
Last active August 29, 2015 13:57
Почти полный ребилд приложения
#!/bin/bash
build_env=nxt
function on_build_start {
start_time=`date +%s`
}
function on_build_end {
end_time=`date +%s`
@ushkinaz
ushkinaz / Shift-Shift.ahk
Last active January 4, 2016 03:39
Mapping SHIFT-SHIFT to Alt-Shift, allowing to use former one as keyboard layout switch.
LShift & RShift::Send {Alt Down}{Shift}{Alt Up}
RShift & LShift::Send {Alt Down}{Shift}{Alt Up}