Skip to content

Instantly share code, notes, and snippets.

View cjohnson496's full-sized avatar

Charles Johnson cjohnson496

View GitHub Profile
@aaronNGi
aaronNGi / newscript.sh
Created April 28, 2020 20:38
Boilerplate for new POSIX shell scripts
#!/bin/sh
prog_name=${0##*/}
version=1.0
version_text="Boilerplate for new scripts v$version"
options="h o: q v V"
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]...
Boilerplate for new scripts
@dustinrouillard
dustinrouillard / BADGES.md
Last active July 21, 2019 21:31
Github Markdown with Badges n' such (Example badge usage for various sites)

Badges for things

Below you will find the markdown and html examples, I've included the html examples because if you want to center them in the readme you'll need to use the html tag variant with a p tag set to align center.

Center tags are used here and you can see how they're all layed out by opening the raw of this file.

<p align="center">
  <!-- Tags here -->
anonymous
anonymous / caribe2
Created February 6, 2018 16:21
MSH|^~\&|ADT1|HOSPITAL|RISADT|RIS|20161207123147739|ADTMESSAGE|ADT^A01|20161207123147739|P|2.4
EVN|A01|20161207123147739
PID|||8-00-407-694-D|357716|RIVERA GONZALEZ^ABRAHAM CONSTANTINO||19710615|M|||CERRO SILVESTRE ARRAIJAN URB. URB. LA ISABELA CASA 46^^^^||3459739|66747559|||||8-407-694|
NK1||^|||||
PV1|||^||||^^|||||-||
AL1|||||
DG1||I9|||||
PR1||||
NTE
anonymous
anonymous / caribe
Created February 6, 2018 16:19
Unable to deliver message with id: 20161207123147739 type: ADT^A01 source:192.168.0.207:63300 facilityCode: HOSPITAL port:9400 received: 02/06/2018 11:12:34 a. m.
Unable to deliver message with id: 20161207123147739 type: ADT^A01 source:192.168.0.207:63302 facilityCode: HOSPITAL port:9400 received: 02/06/2018 11:15:26 a. m.
@bmaupin
bmaupin / mycloud-vulnerabilities.md
Last active January 20, 2018 17:43
Investigating My Cloud vulnerabilities

Description of vulnerabilities: WDMyCloud Multiple Vulnerabilities

Update 2018-01-20

Both critical vulnerabilities (the hard-coded backdoor and the file upload vulnerability) have been corrected as of 2018-01-12 with the following firmwares:

My Cloud device Firmware
@ttscoff
ttscoff / logr.bash
Last active April 16, 2022 23:59
Bash logging utility that simplifies use of logger command
#!/bin/bash
# Logging utility that simplifies user of bash logger command
# # First source the script
# source ~/scripts/logr.bash
# # Start the logger, generates log name from scripts filename
# logr start
# # or define your own
# logr start LOG_NAME
@crittermike
crittermike / wget.sh
Last active March 26, 2024 22:49
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# Example ssh config file. Usually located in ~/.ssh/config (user) or /etc/ssh/ssh_config (system)
# This works on both linux and MacOS
# Basic ssh commands converted to ssh/config file format
# Simplest format
# Run with: "ssh blog" => (equivalent to: "ssh ubuntu@example.com" and "ssh -i ~/.ssh/id_rsa -p 22 ubuntu@example.com")
Host blog
@noniq
noniq / flowdock-archive-to-html.rb
Last active July 1, 2022 11:49
Convert the messages.json file from an exported Flowdock flow into a static HTML page.
#!/usr/bin/env ruby
# Convert an exported Flowdock flow into a static HTML document.
#
# Usage:
#
# flowdock-archive-to-html messages.json > messages.html
#
# The script assumes that there is a subdirectory `files` containing all files referenced in the exported flow. (This is exactly the
# directory structure you get if you unzip an archive downloaded from Flowdock.)