Skip to content

Instantly share code, notes, and snippets.

View ushkinaz's full-sized avatar

Dmitry Sidorenko ushkinaz

  • Antalya
View GitHub Profile
@ushkinaz
ushkinaz / cygwin-mirror-speed.py
Created October 9, 2011 19:16
Tests speed of http mirrors of cygwin
#!/usr/bin/env python3
"""
Tests http mirrors of cygwin
"""
import random
import time
from urllib.request import urlopen
import sys
__author__ = 'Dmitry Sidorenko'

Тулы

Терминал

zsh - Умный bash

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

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

@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 / 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 / log4j.xml
Last active March 26, 2019 09:50
Log4j cowsay configuration
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<param name="encoding" value="UTF-8"/>
<param name="follow" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="
@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 / 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 / gist:5861997
Created June 25, 2013 20:20
Top 10 most used shell commands, zsh version
fc -l 0 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
@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')

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: