Skip to content

Instantly share code, notes, and snippets.

View nikescar's full-sized avatar
😁
;)

Woojae, Park nikescar

😁
;)
View GitHub Profile
@steigr
steigr / gentoo-initrd-autoinstall-netboot.patch
Created July 29, 2013 15:07
Patch for Gentoo Installer InitRD to download the minimal iso-file at early-boot (before switch-root), mount it and the included squashfs-image loopback. Further there is a new commandline-option "autoinstall" which must be a shellscript. It will be executed after the installer finished booting (at "Starting local") and is intended to bootstrap …
--- gentoo.igz/init.orig 2013-07-29 16:56:59.274531548 +0200
+++ gentoo.igz/init 2013-07-29 16:53:28.636472431 +0200
@@ -254,6 +254,11 @@
nounionfs)
USE_UNIONFS_NORMAL=0
;;
+ autoinstall)
+ AUTO_INSTALL_URL=${x#*=}
+ export AUTO_INSTALL_URL
+ good_msg "Autoconfiguration from ${AUTO_INSTALL_URL}"
@klein0r
klein0r / gist:5441524
Last active July 23, 2021 15:20 — forked from davidalexander/gist:1086455
Magento Tips, Tricks and Snippets
@jirutka
jirutka / rules-both.iptables
Created September 18, 2012 12:42
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <[email protected]>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@aceberg
aceberg / iptables_port_fw.sh
Created March 19, 2012 06:35
Port forwarding in iptables
#!/bin/bash
IPTABLES="/sbin/iptables"
GW_IP="X.X.X.X"
SERVER_IP="10.0.2.15"
GW_PORT=7080
S_PORT=8080
$IPTABLES -t nat -A PREROUTING -p tcp --dst $GW_IP --dport $GW_PORT -j DNAT --to-destination $SERVER_IP:$S_PORT
$IPTABLES -t nat -I POSTROUTING -p tcp --dst $SERVER_IP --dport $S_PORT -j SNAT --to $GW_IP
echo 1 > /proc/sys/net/ipv4/ip_forward