Skip to content

Instantly share code, notes, and snippets.

View basoro's full-sized avatar

Basoro basoro

View GitHub Profile
@basoro
basoro / letsencrypt-proxmox.md
Created June 2, 2020 22:44 — forked from lichti/letsencrypt-proxmox.md
Proxmox with letsencrypt ssl
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
 --standalone \
@basoro
basoro / 40_custom
Created March 25, 2020 20:33
Add Prime OS (Android_x86_x64) to grub menu
from debian add the android entry to /etc/grub.d/40_custom
menuentry 'Android' --class android --class android-x86_64 --class gnu-linux --class os {
set root='(hd0,2)'
linux /android/kernel root=/dev/ram0 SERIAL=random logo.showlogo=1 androidboot.selinux=permissive quiet DATA= USB_DATA_PARTITION=1
initrd /android/initrd.img
}
update the grub
@basoro
basoro / proxyclient.service
Created February 27, 2020 00:49
Creating new systemd service unit
# vi /etc/systemd/system/proxyclient.service
[Unit]
Description=Proxy Client
After=network.target
[Service]
Type=simple
ExecStart=/usr/sbin/proxy_client -s metro.basoro.id -p 4900 -k key
TimeoutStartSec=0
InnoDB: Attempted to open a previously opened tablespace
Open my.ini (my.cnf on linux-based systems and Mac)
Look for [mysqld]
Just below [mysqld] insert innodb_force_recovery = 1
Start MySQL Service
Stop MySQL Service
Remove the line from my.ini (innodb_force_recovery = 1)
Start MySQL Service
Worked perfect in my case.
@basoro
basoro / tinydns.sh
Created May 26, 2019 21:05
Installer djbdns on centos 6
#!/bin/bash
yum install wget gcc make -y
mkdir -p /usr/local/src/tinydns
# Compile and install daemontools:
cd /usr/local/src/tinydns
wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
tar -xzf daemontools-0.76.tar.gz
@basoro
basoro / proxmox-proxy
Created May 25, 2019 20:45
Running Proxmox behind a single IP address
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs:
@basoro
basoro / arm7repo
Created April 16, 2019 22:45
Centos 7 repo for raspi
cat > /etc/yum.repos.d/epel.repo << EOF
[epel]
name=Epel rebuild for armhfp
baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/
enabled=1
gpgcheck=0
EOF
@basoro
basoro / lxde-mint
Last active March 11, 2019 23:39
LinuxMint with LXDE Window Manager based on Mate
1. First, LXDE and some accessories are installed (terminal):
apt-get install catfish galculator gedit gedit-common gnome-screenshot gpicview leafpad libfm-data libfm-extra4 libfm-gtk-data libfm-gtk4 libfm-modules libfm4 libid3tag0 libimlib2 libkeybinder0 libmenu-cache-bin libmenu-cache3 libobrender32v5 libobt2v5 libunique-1.0-0 libwnck-common libwnck22 lxappearance lxappearance-obconf lxde lxde-common lxde-core lxde-icon-theme lxhotkey-core lxhotkey-gtk lxinput lxmenu-data lxpanel lxpanel-data lxrandr lxsession lxsession-data lxsession-edit lxsession-logout lxtask lxterminal openbox openbox-lxde-session pcmanfm xarchiver xscreensaver
2. Remover MATE and accessories
apt-get purge caja caja-admin caja-common caja-open-terminal engrampa engrampa-common gir1.2-mate-desktop gir1.2-mate-panel gir1.2-matedesktop-2.0 gir1.2-matepanelapplet-4.0 libmate-desktop-2-17 libmate-menu2 libmate-sensors-applet-plugin0 libmate-slab0 libmate-window-settings1 libmatedict6 libmatekbd-common libmatekbd4 libmatemixer-common libma
@basoro
basoro / tiger-vnc.rb
Last active February 19, 2019 15:46
wut
class TigerVnc < Formula
homepage "http://tigervnc.org/"
url "https://github.com/TigerVNC/tigervnc/archive/v1.9.0.tar.gz"
sha256 "f15ced8500ec56356c3bf271f52e58ed83729118361c7103eab64a618441f740"
depends_on "cmake" => :build
depends_on "gnutls" => :recommended
depends_on "jpeg-turbo"
depends_on "gettext"
depends_on :x11
apt-get install software-properties-common python-software-properties
add-apt-repository 'deb http://packages.dotdeb.org wheezy-php56 all'
add-apt-repository 'deb-src http://packages.dotdeb.org wheezy-php56 all'
~~~~~~~~~~~~ jessy
add-apt-repository 'deb http://packages.dotdeb.org jessie all'
add-apt-repository 'deb-src http://packages.dotdeb.org jessie all'
~~~~~~~~~~~~
wget http://www.dotdeb.org/dotdeb.gpg