Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Andrey Arapov arno01

🎯
Focusing
Block or report user

Report or block arno01

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
@arno01
arno01 / README-setup-tunnel-as-systemd-service.md
Created Oct 30, 2019 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward
View README-setup-tunnel-as-systemd-service.md

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@arno01
arno01 / docker-on-android.md
Last active Nov 13, 2019
Docker on Android
View docker-on-android.md

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@arno01
arno01 / 0-README.md
Last active Jan 17, 2019
Patches for fixing "black screen" issue on MBP with AMD GPU on Linux >=4.18
View 0-README.md
View gist:68b49dd79c6813788e590f7088d62dc3
2018/10/08 11:40:22 [DEBUG] ReferenceTransformer: "data.vsphere_datacenter.dc" references: []
2018/10/08 11:40:22 [DEBUG] ReferenceTransformer: "data.vsphere_host.host" references: [data.vsphere_datacenter.dc]
2018/10/08 11:40:22 [DEBUG] ReferenceTransformer: "data.vsphere_resource_pool.pool" references: [data.vsphere_datacenter.dc]
hableDataResource
data.vsphere_datacenter.dc - *terraform.NodeRefreshableDataResource
provider.vsphere - *terraform.NodeApplyableProvider
var.vsphere_password - *terraform.NodeRootVariable
var.vsphere_server - *terraform.NodeRootVariable
var.vsphere_user - *terraform.NodeRootVariable
provider.vsphere (close) - *terraform.graphNodeCloseProvider
View 00-Systemd_service_for_autossh.md

Usage

curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@host1 | \
  sudo tee /etc/default/autossh@example
curl -sSL https://gist.githubusercontent.com/ttimasdf/ef739670ac5d627981c5695adf4c8f98/raw/autossh@.service | \
  sudo tee /etc/systemd/system/autossh@.service

sudo useradd -g nogroup -s /bin/false -m tunnel
sudo -u tunnel mkdir -p ~tunnel/.ssh  # and copy your private key here
@arno01
arno01 / gist:535913090ffa65ce3dfaf67ac1e880d4
Created Jul 13, 2016
pulseaudio, deleted files in /dev/shm, grsecurity, etc...
View gist:535913090ffa65ce3dfaf67ac1e880d4
Workaround: pulseaudio client library likes to remove /dev/shm/pulse-shm-*
files created by the host, causing sound to stop working.
To fix this, we either want to disable the shm or mount /dev/shm
in read-only mode when starting the container.
echo "enable-shm = no" |tee -a /etc/pulse/client.conf
Q: But why it works in chroot?
A: chroot does not create a new pid namespace.
However, when a client runs in a sandbox that creates a new pid namespace,
pa_shm_cleanup() will remove all shm files, because kill() fails with ESRCH.
@arno01
arno01 / git-cache-meta.sh
Created Oct 19, 2015
Simple file meta data caching and applying. Good alongside with git
View git-cache-meta.sh
#!/bin/sh -e
# git-cache-meta -- simple file meta data caching and applying.
# Simpler than etckeeper, metastore, setgitperms, etc.
# from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694
# modified by n1k
# - save all files metadata not only from other users
# - save numeric uid and gid
# Changes by: Andrey Arapov <andrey.arapov@nixaid.com>
@arno01
arno01 / keybase.md
Created Sep 17, 2014
keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am arno01 on github.
  • I am andreyarapov (https://keybase.io/andreyarapov) on keybase.
  • I have a public key whose fingerprint is A025 3B65 7A7F 1D4C 3305 20F6 368D DA2E 9A47 1EAC

To claim this, I am signing this object:

@arno01
arno01 / dhtest.py
Created Sep 12, 2014
Diffie-Hellman key exchange example in python
View dhtest.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# -------------------------------------
# Diffie-Hellman key exchange example
# Copyright (C) 2014 Andrey Arapov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@arno01
arno01 / rsatest.py
Last active Aug 29, 2015
RSA Key Generation, Encryption and Decryption example
View rsatest.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# -------------------------------------
# RSA Key Generation, Encryption and Decryption example
# Copyright (C) 2014 Andrey Arapov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
You can’t perform that action at this time.