Skip to content

Instantly share code, notes, and snippets.

View td512's full-sized avatar

Kid td512

View GitHub Profile
http://f25.amahi.org/
# Kickstart file for composing the "Fedora" spin of Fedora Server
# Maintained by the Fedora Release Engineering team:
# Modified for Fedora 25 on special request by Fedora Respins SIG (20170324)
# https://fedoraproject.org/wiki/ReleaseEngineering
# https://fedoraproject.org/wiki/Respins-SIG
# mailto:rel-eng@lists.fedoraproject.org
# Use a part of 'iso' to define how large you want your isos.
# Only used when composing to more than one iso.
# Default is 695 (megs), CD size.
Pungi.INFO: Found hda-ctl.x86_64
Pungi.INFO: Checking deps of hda-ctl.x86_64
Pungi.INFO: Added wget.x86_64 (repo: fedora) for hda-ctl.x86_64
Pungi.INFO: Added sudo.x86_64 (repo: fedora-updates) for hda-ctl.x86_64
Pungi.INFO: Added samba.x86_64 (repo: fedora-updates) for hda-ctl.x86_64
Pungi.INFO: Added rubygem-mysql2.x86_64 (repo: fedora) for hda-ctl.x86_64
Pungi.INFO: Added rubygem-ruby-dbus.noarch (repo: fedora) for hda-ctl.x86_64
Pungi.INFO: Added rubygem-bundler.noarch (repo: fedora) for hda-ctl.x86_64
Pungi.INFO: Added ruby-libs.x86_64 (repo: fedora-updates) for hda-ctl.x86_64
Pungi.INFO: Added ruby-augeas.x86_64 (repo: fedora) for hda-ctl.x86_64
http://localhost
cadaver
fontconfig
fontpackages-filesystem
gd
hddtemp
jbigkit-libs
libX11
libX11-common
libXau
libXpm
#!/bin/bash
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/sysconfig/selinux
sed -i 's/\(^SELINUX=\).*/\SELINUX=disabled/' /etc/selinux/config
setenforce 0
sestatus
yum -y update
yum -y groupinstall core base "Development Tools"
yum -y install lynx mariadb-server mariadb php php-mysql php-mbstring tftp-server \
httpd ncurses-devel sendmail sendmail-cf sox newt-devel libxml2-devel libtiff-devel \
audiofile-devel gtk2-devel subversion kernel-devel git php-process crontabs cronie \
#!ipxe
kernel http://10.10.10.80/6/os/x86_64/images/pxeboot/vmlinuz
initrd http://10.10.10.80/6/os/x86_64/images/pxeboot/initrd.img

Download files

curl -o file http://url/file

Headers

curl -H "header: value" http://url/path

POST method

curl -XPOST -d "{'key1':'value1'}" http://url/path

POST file to server

curl -XPOST -F "file_param=@file" http://url/path

# The IP. In this example we'll get it from the environment
ip = ARGV[0]
# First, let's split the IP into octets and map them to integers
ip = ip.split(".").map(&:to_i)
# Now that's done, let's loop through each octet
ip.each do |octet|
# Check if the length of the integer is still more than 1 AND the first character in the octet is 0
while octet.digits.count > 1 && octet[0] == '0' do
# Strip the 0 out
octet[0] == ''
@td512
td512 / convert2vz
Last active February 18, 2018 21:54
Quickly converts physical machines to VZ
#!/bin/bash
#
# Monarch Solutions VZ conversion script
CTID=$1
HOST=$2
IP=$3
NS=$4
echo "Starting VZ conversion, CTID $CTID"