sudo sh -c 'cat > /etc/apt/apt.conf.d/99force-ipv4 <<EOF
Acquire::ForceIPv4 "true";
EOF'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import paramiko | |
from paramiko.ssh_exception import SSHException | |
import threading | |
import select | |
import time | |
import logging | |
import re | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import re | |
import logging | |
import sys | |
import time | |
import webbrowser | |
import pprint | |
import argparse | |
import subprocess | |
import shlex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo useradd --create-home --skel /dev/null --home-dir /repo --shell /usr/bin/git-shell git | |
sudo chmod 750 /repo | |
sudo mkdir -p /repo/.ssh | |
sudo cp ~/.ssh/authorized_keys /repo/.ssh/ # Use current user's authorized_keys | |
sudo chown -R git:git /repo/.ssh/ | |
sudo mkdir -p /repo/git-shell-commands | |
sudo sh -c "cat >/repo/git-shell-commands/no-interactive-login <<\EOF | |
#!/bin/sh | |
printf '%s\n' \"No interactive shell access is provided by this GIT server.\" | |
exit 128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
maxconn 16384 | |
log 127.0.0.1 len 8192 local0 | |
log-send-hostname | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create nginx config /etc/nginx/conf.d/www.transmission.conf | |
# sudo synoservice --restart nginx | |
location /transmission { | |
if ($scheme = http) { | |
return 301 https://$http_host$request_uri; | |
} | |
auth_basic "Server Restricted"; | |
auth_basic_user_file /etc/nginx/conf.d/.htpasswd; | |
allow 192.168.1.1; | |
allow 192.168.1.192/28; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a unique private key (KEY) | |
sudo openssl genrsa -out mydomain.key 2048 | |
# Generating a Certificate Signing Request (CSR) | |
sudo openssl req -new -key mydomain.key -out mydomain.csr | |
# Creating a Self-Signed Certificate (CRT) | |
openssl x509 -req -days 365 -in mydomain.csr -signkey mydomain.key -out mydomain.crt | |
# Append KEY and CRT to mydomain.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconst package-no-https nil | |
"Use plain http when contacting ELPA repositories.") | |
(defconst package-upgrade-check-interval 7200 | |
"Interval to perform ELPA packages upgrade check.") | |
(defconst package-upgrade-check-stamp | |
(expand-file-name "package-upgrade-check-stamp" | |
user-emacs-directory) | |
"Filename that store the timestamp that last ELPA packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
apt-get update | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install python nss leveldb oath-toolkit boost-python3 | |
pip3 install -U cython sphinx | |
export PKG_CONFIG_PATH=$(brew list --verbose nss 2>&1 1>/dev/null | awk '{print $2}')/lib/pkgconfig:$(brew list --verbose openssl 2>&1 1>/dev/null | awk '{print $2}')/lib/pkgconfig | |
export PYTHON3_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") | |
export PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") | |
export SNAPPY_ROOT_DIR=$(brew list --verbose snappy 2>&1 1>/dev/null | awk '{print $2}') | |
cmake -H. -BDebug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES \ |
OlderNewer