Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Artur Balanuta ABalanuta

🎯
Focusing
Block or report user

Report or block ABalanuta

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ABalanuta
ABalanuta / ssh-cipher-benchmark.sh
Created Apr 18, 2019 — forked from dlenski/ssh-cipher-benchmark.sh
Check speed of ssh cipher(s) on your system
View ssh-cipher-benchmark.sh
#!/bin/bash
# Based on: http://www.systutorials.com/5450/improving-sshscp-performance-by-choosing-ciphers/#comment-28725
#
# You should set up PublicKey authentication so that you don't have to type your
# password for every cipher tested.
set -o pipefail
ciphers="$@"
View KeyBase proof
### Keybase proof
I hereby claim:
* I am abalanuta on github.
* I am arturbalanuta (https://keybase.io/arturbalanuta) on keybase.
* I have a public key ASDEHu1OYsbFR5DV1_3sO7ultS7gNxY0akYnFziH9EoKSAo
To claim this, I am signing this object:
View gist:69de0bfd041af0c7c9376c9696c0d6fc
#!/bin/bash
# From: https://gitlab.com/grownetics/devops/blob/master/tor_ssh.sh
# TOR Setup Script
# Author: Nick Busey
#
# This file is meant to get SSH access via Tor to a server in one command.
#
# Usage (as root): $ bash <(curl -s https://gitlab.com/grownetics/devops/raw/master/tor_ssh.sh)
@ABalanuta
ABalanuta / Removing commits on github
Last active Dec 11, 2018 — forked from dsci/gist:1347672
Delete commits from repository.
View Removing commits on github
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:master
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:master -f
@ABalanuta
ABalanuta / gist:181e00d305a03a05e9c377395d745e85
Created Dec 1, 2018 — forked from palexander/gist:2975305
Compiling and running mosh on Dreamhost
View gist:181e00d305a03a05e9c377395d745e85
# Thanks to @samsonjs for the cleaned up version:
# https://gist.github.com/samsonjs/4076746
PREFIX=$HOME
VERSION=1.2.3
# Install Protocol Buffers
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2
tar -xf protobuf-2.4.1.tar.bz2
cd protobuf-2.4.1
View ROCKPI4 EVP
rock@localhost:~$ openssl speed aes-256-cbc
Doing aes-256 cbc for 3s on 16 size blocks: 10955656 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 64 size blocks: 2971918 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 256 size blocks: 752396 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 1024 size blocks: 189230 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 8192 size blocks: 23578 aes-256 cbc's in 3.00s
Doing aes-256 cbc for 3s on 16384 size blocks: 11824 aes-256 cbc's in 3.00s
OpenSSL 1.1.0g 2 Nov 2017
built on: reproducible build, date unspecified
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr)
View test_best_ssh_speed.sh
for i in `ssh -Q cipher`; do dd if=/dev/zero bs=1M count=300 2> /dev/null | ssh -c $i $USER@localhost "(time -p cat) > /dev/null" 2>&1 | grep real | awk '{print "'$i': "300 / $2" MB/s" }'; done
# /etc/ssh/ssh_config (or ~/.ssh/config) and sshd_config
Ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com
#https://turecki.net/content/getting-most-out-ssh-hardware-acceleration-tuning-aes-ni
@ABalanuta
ABalanuta / etc default lora-gateway-bridge
Last active Nov 6, 2017
lora-gateway-bridge configuration files for the MultiTech Conduit: https://github.com/OpenChirp/docs/wiki/Multitech-Conduit/
View etc default lora-gateway-bridge
# ip:port to bind the UDP listener to (default: "0.0.0.0:1700")
UDP_BIND=127.0.0.1:1700
# mqtt server (e.g. scheme://host:port where scheme is tcp, ssl or ws) (default: "tcp://127.0.0.1:1883")
MQTT_SERVER=tls://openchirp.andrew.cmu.edu:1883
# mqtt prefix
MQTT_PREFIX="<your_openchirp_device_endpoint>"
# mqtt server username (optional)
@ABalanuta
ABalanuta / twisted-webserver-ssl-authentication.py
Last active Aug 29, 2017
Twisted SSL webserver with basic authentication using plain in-memory passwords. The first argument is the path of the folder to serve; if not provided then the current folder is used (".").
View twisted-webserver-ssl-authentication.py
#!/usr/bin/env python3
"""
Twisted SSL webserver with basic authentication using plain in-memory passwords.
The first argument is the path of the directory to serve; if not provided then the current folder is used (".").
INSTALL DEPENDENCIES:
pip install twisted
pip install pyOpenSSL
pip install service_identity
View generate-pemfile.sh
#!/bin/bash
openssl req -new -x509 -keyout yourpemfile.pem -out yourpemfile.pem -days 3650 -nodes
You can’t perform that action at this time.