Skip to content

Instantly share code, notes, and snippets.

View Guyverix's full-sized avatar
🤑

Christopher Hubbard Guyverix

🤑
View GitHub Profile
@mwvent
mwvent / cam_alarmserver_zm_bridge.sh
Last active March 13, 2020 02:33
Receive motion events from Xiongmai/Netsurv web camera and pass to Zoneminders trigger port eliminating need for image analysis on ZM Server
#!/bin/bash
# Function to translate camera serial into zoneminder monitor id
function serialToID() {
MONITORID=0
if [ "$1" == '"383c49531157b1b1"' ]; then
MONITORID=9
fi
echo $MONITORID
}
# Netcat persistent listen
@anvk
anvk / psql_useful_stat_queries.sql
Last active February 17, 2025 18:48
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@gabonator
gabonator / camera.md
Created June 4, 2016 13:48
Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Cheap chinese IP camera with H264 encoding based on Hisilicon 8M (Hi3518E) chip

Video stream url for VLC/DVR:

  • rtsp://192.168.1.93:554/user=admin&password=&channel=&stream=.sdp?real_stream--rtp-caching=100

Telnet access

  • telnet 192.168.1.10 23
  • Localhost login: root
  • Password: xmhdipc
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@SeanTRobinson
SeanTRobinson / ConfluenceBackup.sh
Last active November 28, 2024 03:41
Backup Atlassian Jira and Confluence from the command line.
#!/bin/bash
USERNAME=<username>
PASSWORD=<password>
INSTANCE="<company>.atlassian.net"
LOCATION="./Backups/"
mkdir "Backups"
# Grabs cookies and generates the backup on the UI.
@carymrobbins
carymrobbins / retry
Last active November 3, 2020 10:38
Retry a bash command until successful.
#!/bin/bash
if [ "$1" == "-h" ] || [ "$1" == "--help" ] || [ "$1" == "" ]; then
echo "Usage: $(basename $0) n command"
echo "Execute command n times or until it succeeds (exit code 0)."
exit $([ $1 ] || echo 1)
fi
control_c() {
echo "$(tput setaf 1)Killing process per user request.$(tput sgr0)"

An Ansible summary

Patterns

  • all (or *)
  • hostname: foo.example.com
  • groupname: webservers
  • or: webservers:dbserver
  • exclude: webserver:!phoenix
  • intersection: webservers:&amp;staging
@bonsaiviking
bonsaiviking / tls-extended-random.nse
Last active August 29, 2015 13:57
Nmap NSE script to check for TLS Extended Random support. Requires Nmap (http://nmap.org) and the latest version of the tls.lua library from https://svn.nmap.org/nmap/nselib/tls.lua
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local bin = require "bin"
local tls = require "tls"
description = [[
Checks for server support of the Extended Random TLS extension, which was
allegedly created to make exploitation of the Dual EC DRBG weakness easier. The
extension was never widely adopted, and IANA did not assign an ExtensionType
@JosefJezek
JosefJezek / zenoss_json_api.sh
Last active February 26, 2018 01:23 — forked from cluther/zenoss-shell-functions
Zenoss JSON API Shell / Bash script
#!/bin/sh
# Zenoss JSON API Shell / Bash script
# Link: https://gist.github.com/8399651
# Resources
# http://wiki.zenoss.org/Working_with_the_JSON_API
# https://gist.github.com/cluther/1901884
# http://blog.remibergsma.com/2013/04/26/automatically-adding-and-editing-devices-in-zenoss-core-4-using-the-api
@thcipriani
thcipriani / baller_motd.md
Last active February 12, 2023 12:28
Using img2ponysay to create baller /etc/motd message

Update: I made this a proper blog post

Creating Baller/Useful MOTD Messages

Zangief MOTD

Prerequisites

  • linux box