Skip to content

Instantly share code, notes, and snippets.

View Handsome1080P's full-sized avatar
🌴
On vacation

JohnConnor Handsome1080P

🌴
On vacation
  • CMD
  • TaiPei
View GitHub Profile
@bububa
bububa / gist:2947281
Created June 18, 2012 07:25
Supervisord
REFERENCE: http://www.masnun.me/2011/11/02/gearman-php-and-supervisor-processing-background-jobs-with-sanity.html
apt-get install python-setuptools
easy_install supervisor
echo_supervisord_conf > /etc/supervisord.conf
=============================================
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
@tomasinouk
tomasinouk / snat_dnat_advantech.md
Last active May 29, 2024 18:17
examples of SNAT, DNAT with iptables for Advantech, Conel routers, with comments (probably will work on other routers where iptables can be manipulated, care needs to be taken on applying these commands after reboot).

Some examples of SNAT, DNAT with iptables with comments

mainly used in start-up script

How to test 'safely'

When we play with iptables aka firewall we might end up in situation, where we execute rule, which has unforseen impact - lock yourself out. Recovering from this situation is necessity.

How to:

  • Enable reboot via SMS.
  • Test all commands in shell first before putting them into Start-up script. This way the command will be wiped out, when unit is rebooted.

masquarade all outgoing packets to be WLAN0 IP

@dhhdev
dhhdev / my-arch-install-cheat-sheet.md
Last active November 10, 2023 23:44
My Arch Installation Cheat Sheet, so I can remember it all.

Install Arch Linux

This is my personal setup almost every time I install Arch Linux. This is meant for me as being something I can quickly reference.

Change localkeys to my keyboard layout

In my case I have a Danish keyboard layout.

@DazWorrall
DazWorrall / interfaces
Created February 11, 2016 15:04
Interfaces file with vlans and vxlans
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
@novemberborn
novemberborn / howto.md
Created February 18, 2016 17:47
Creating a PKCS#12 file from a Let's Encrypt certificate
@hkato
hkato / vpnserver.service
Created March 19, 2017 19:26
Systemd Unit configuration for SoftEther VPN Server
[Unit]
Description=SoftEther VPN Server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/vpnserver/vpnserver start
ExecStop=/usr/local/vpnserver/vpnserver stop
ExecStartPost=/bin/sleep 5
ExecStartPost=/bin/bash -c "/bin/systemctl set-environment dev=$(ip addr | grep tap_ | sed 's/^.*: \(tap_.*\):.*$/\1/g')"
@joshschmelzle
joshschmelzle / remove-gamebar-powershell-win10.md
Last active May 29, 2024 12:33
How to Remove the Xbox Game Bar with Powershell on Windows 10

You've probably stumbled upon this researching how to remove the Xbox Game Bar. This gist includes a few different methods you can try. Please note that some of these first options are probably not be available unless you are running an older version of Windows 10.

Uninstalling/Removing the Game Bar (old Windows 10 build GUI options)

(this is no longer an option on any recent Windows 10 build)

  1. Press Windows Key or click on the Start menu.
  2. Start typing Xbox or Game Bar, until you get the Xbox Game Bar app to appear in the results.
  3. Right-click on the app and pick Uninstall. Answer Yes to the prompt, and wait for the process to finish.
@musale
musale / remove.sh
Created June 20, 2017 14:46
Remove and re-install node on arch linux
sudo pacman -Rsc -n nodejs
sudo pacman -Sy nodejs
sudo pacman -Sy npm
@ewpratten
ewpratten / hosts-yt-ads
Last active November 30, 2023 18:45
youtube ads hosts file
This project has been moved to a GitHub repository to allow Pull Requests.
See: https://github.com/Ewpratten/youtube_ad_blocklist