Skip to content

Instantly share code, notes, and snippets.

View jacob-pro's full-sized avatar

Jacob Halsey jacob-pro

View GitHub Profile
@jacob-pro
jacob-pro / ssh.Dockerfile
Created April 19, 2023 11:38
Passwordless SSH Gateway Server in Container
FROM oraclelinux:7
RUN yum update && yum install -y openssh-server passwd && yum -y clean all
RUN echo "PermitEmptyPasswords yes" >> /etc/ssh/sshd_config
RUN echo "GatewayPorts yes" >> /etc/ssh/sshd_config
RUN /usr/bin/ssh-keygen -A
RUN passwd -d root
CMD ["/usr/sbin/sshd", "-D"]

How to create interactive shell into a CI Build Runner:

  1. Create a publicly accessible server
  2. Ensure firewall on the instance incoming port 443
  3. Add a build step:
wget https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/socat -O ~/socat
chmod +x ~/socat

while :
@jacob-pro
jacob-pro / advancedsettings.xml
Last active February 2, 2023 00:01
Kodi Advanced Settings for Downloading Chinese Traditional opensubtitles
<advancedsettings>
<languagecodes>
<code>
<short>zht</short>
<long>Chinese (Traditional)</long>
</code>
<code>
<short>ze</short>
<long>Chinese bilingual</long>
</code>
import org.junit.jupiter.api.Test;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.junit.jupiter.api.Assertions.assertEquals;
class MergeTest {
# Put this in /usr/share/applications
# jetbrains-idea.desktop
[Desktop Entry]
Name=IntelliJ IDEA Ultimate
Icon=/opt/idea-IU-221.5080.210/bin/idea.svg
StartupWMClass=jetbrains-idea
Comment=The most intelligent Java IDE
Exec="/opt/idea-IU-221.5080.210/bin/idea.sh" %u
Version=1.0
#!/bin/sh
# Change settings for another user account
sudo -i -u jacob bash <<-EOF
exec dbus-run-session -- bash -c "dconf write /system/proxy/mode \"'none'\""
EOF
sudo tar -zxvf goland-2017.3.2.tar.gz -C /opt
cd /opt/GoLand-2017.3.2/bin`
./goland.sh

Tools -> Create desktop entry

@jacob-pro
jacob-pro / ol8-seafile-client
Last active July 7, 2021 09:31
Build and Install Seafile Client on CentOS 8 / Oracle Linux 8
yum groupinstall "Development tools"
yum install epel-release dnf-plugins-core
### Centos 8
sudo dnf config-manager --set-enabled PowerTools
### Oracle Linux 8
sudo dnf config-manager --set-enabled ol8_codeready_builder
# https://community.oracle.com/tech/apps-infra/discussion/4314646/powertools-and-pgadmin-4-on-oracle-linux-8
@jacob-pro
jacob-pro / android-shutter.ps1
Last active July 6, 2021 10:45
Control Android camera from PC keyboard
.\adb.exe devices
$run = $true
"Press space for shutter or X to exit"
while($run) {
$key = [Console]::ReadKey($true)
if($key.KeyChar -eq ' ') {
.\adb.exe shell "input keyevent KEYCODE_CAMERA"
} elseif($key.KeyChar -like 'x') {
$run = $false
}
@jacob-pro
jacob-pro / haproxy.cfg
Last active December 20, 2020 11:39
HAProxy config for both TCP and HTTP backends on port 443 (Reverse proxy)
global
daemon
# https://ssl-config.mozilla.org
ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
ssl-default-server-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384