Skip to content

Instantly share code, notes, and snippets.

View fr34k8's full-sized avatar
🎯
Focusing

fr34k8

🎯
Focusing
View GitHub Profile
@fr34k8
fr34k8 / cmk-add-host
Last active August 27, 2015 09:57 — forked from anonymous/cmk-add-host
Check MK add host script in bash
#!/bin/bash
site=$1; shift
hostname=$1; shift
mk_file="/opt/omd/sites/$site/etc/check_mk/conf.d/wato/hosts.mk"
wato_file="$(dirname $mk_file)/.wato"
## exit with code 1 if host exists
(
@fr34k8
fr34k8 / syslinux-install_update
Last active September 2, 2015 13:52 — forked from pyther/syslinux-install_update
syslinux-install_update
#!/bin/bash
#
# Sylinux Installer / Updater Scripts
# Copyright (C) 2011 Matthew Gyurgyik <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
@fr34k8
fr34k8 / mkgentoo.sh
Last active September 7, 2015 17:55 — forked from bencord0/mkgentoo.sh
#!/bin/bash
set -e
FETCHCOMMAND='wget -t 3 -T 5 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"'
RESUMECOMMAND='wget -c -t 3 -T 5 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}"'
export FETCHCOMMAND RESUMECOMMAND
emerge --usepkg --buildpkg --update \
app-emulation/qemu \
net-misc/curl \
sys-block/parted \
sys-fs/multipath-tools
@fr34k8
fr34k8 / gist:77a3c1e7e4ad387db250
Created September 28, 2015 14:58 — forked from anuaimi/gist:4074714
using augeas to add user to sudoers
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/user ubuntu
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/host_group/host ALL
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/host_group/command ALL
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/host_group/command/runas_user ALL
augtool -s set /files/etc/sudoers/spec[user='ubuntu']/host_group/command/tag NOPASSWD
@fr34k8
fr34k8 / notes.txt
Created November 2, 2015 17:16 — forked from smoser/README.md
ubuntu-auto-install: install a ubuntu image with kvm
## how i verified hwe-t kernel boots / functions.
$ sudo apt-get update
$ sudo apt-get install qemu-system-x86
$ sudo chmod 666 /dev/kvm
$ burl="http://archive.ubuntu.com/ubuntu/dists/precise-proposed/main/installer-amd64/current/images/trusty-netboot/ubuntu-installer/"
$ wget "$burl/amd64/linux" -O kernel
$ wget "$burl/amd64/initrd.gz" -O initrd
@fr34k8
fr34k8 / authtest_apr23.py
Created November 10, 2015 14:41 — forked from DinisCruz/authtest_apr23.py
TeamMentor python - Invoke WebServices and test Anonymous access (by arvinddoraiswamy
import suds
import re
import sys
import os
#Enter WSDL Url here
url='http://....:8000//aspx_pages/TM_WebServices.asmx?WSDL'
#All Global variables
users={}; datatype_values={}; report={}
@fr34k8
fr34k8 / gource-multi
Created December 21, 2015 12:35 — forked from BlinkyStitt/gource-multi
Run gource over a bunch of repos and save an mp4
#!/usr/bin/env bash
# Generates gource video (h.264) out of multiple repositories.
# Pass the repositories in command line arguments.
# Example:
# <this.sh> /path/to/repo1 /path/to/repo2
OUTFILE="gource.mp4"
set -x
#!/bin/sh
resolution=1360x720
seconds_per_day=0.01
auto_skip_seconds=0.1
elasticity=0.05
fps=25
bitrate=4000K
extension=webm
input=8bit.gource
@fr34k8
fr34k8 / gource-commands.txt
Created December 22, 2015 18:00 — forked from rafi/gource-commands.txt
Gource command
################################
gource commands
################################
# basic command for big and long projects
gource --max-user-speed 500 --seconds-per-day 0.05 --file-idle-time 10 -e 0.005 -f --max-files 300 --hide-files
# some easy to understand commands
# for output file
--output-ppm-stream ~/ppm/ppm-kohana
@fr34k8
fr34k8 / ssh-proxy.md
Created December 22, 2015 18:01 — forked from marthjod/ssh-proxy.md
HTTP-tunneled remote SSH proxy

HTTP-tunneled remote SSH proxy

Setup

Network

  • Bonus: SSHD lives on its own network connected to the Inet-NATted LAN, so that
[public IP]:443