Skip to content

Instantly share code, notes, and snippets.

@mrjones-plip
mrjones-plip / gist:7bbe7b0a44ce7876a551b9730c6fc43d
Last active May 27, 2022
Developer CHT Install with couchdb in docker (standard)
View gist:7bbe7b0a44ce7876a551b9730c6fc43d
# a quick way to install a CHT instance. Uses starndard docker based couchdb
# see bare-metal guide here: https://gist.github.com/mrjones-plip/7760b6a1a7e9cface3714a16fe60eb93
#
# assumes running as not root user, but with user with sudo
# update system, choose default and "ok" for any prompts
sudo apt update
sudo apt -y dist-upgrade
# install NVM, add to path, install node 12
@mrjones-plip
mrjones-plip / cht-install-bare-metal-couch.txt
Last active May 26, 2022
Developer Install CHT - bare metal couchdb
View cht-install-bare-metal-couch.txt
# a quick way to install a CHT instance. Uses bare metal couchdb
# see docker based install here: https://gist.github.com/mrjones-plip/7bbe7b0a44ce7876a551b9730c6fc43d
#
sudo apt update
sudo apt dist-upgrade
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
@mrjones-plip
mrjones-plip / couch.js
Created May 16, 2022
Script for bulk adding CHT contacts with ever so slightly different attachments ;)
View couch.js
/*
To use this script:
- Save this script into a directory
- Include a PNG image in the directory called SamplePNG_1.png
- From within that directory, install nano: `npm install nano`
- Update the constants below to match your desired values
- Run the script: 'node couch.js`
*/
const NUMBER_OF_DOCS = 100;
const STARTING_INDEX = 2200; // Update this on subsequent runs to avoid id conflicts when running the script multiple times
@mrjones-plip
mrjones-plip / cht-docker-compose-macos-11.6-intell.md
Last active Oct 22, 2021
Install CHT on clean install of macOS Big Sur 11.6 MacBook Pro (Intel)
View cht-docker-compose-macos-11.6-intell.md

CHT Install on clean install of macOS Big Sur 11.6 on MacBook Pro (Intel MacBook Pro 15-inch, Mid 2014)

  1. download docker desktop
  2. install docker desktop
  3. install homebrew (can do xcode too, but mabye homebrew is lighter weight? Oh...homebrew installs xcode?) which will in turn install git
  4. clone cht-core into ~/Documents/:
     cd ~/Documents&&git clone https://github.com/medic/cht-core.git
    
  5. create an env file for your first CHT instance in ~/Documents/
@mrjones-plip
mrjones-plip / lookup.py
Last active Jun 25, 2021
whois lookup python script
View lookup.py
import time
import whois
import whois.parser
import argparse
import logging.handlers
import sys
my_logger = logging.getLogger('MyLogger')
my_logger.setLevel(logging.DEBUG)
handler = logging.handlers.SysLogHandler(address='/dev/log')
View _readme.md

the terrible idea: php youtube-dl downloader with html5 autoplayer

what

a PHP script that wraps around youtube-dl which allows you to enter in a youtube ID. The script then downloads the entire video at the highest resolution and uses javascript to write an HTML5 video element to the page which in turn autoplays the video you just downloaded.

this is a terrible idea and most likely against youtube's TOS - don't use it! Further, after I wrote this I found alltube (github or alltubedownload.net), which is almost identical to this project, but WAY more fancy. Use that instead!

why

View _readme.md

SYN Shop Kiosk/Dashboard Glue

Files that power SYN Shop dashboard. See rtfm for more info

@mrjones-plip
mrjones-plip / 01-readme.md
Last active Nov 6, 2019
Happy Hacker Halloween
View 01-readme.md
@mrjones-plip
mrjones-plip / 01-readme.md
Last active Nov 16, 2019
A simple Meetup PHP scraper class for getting a multi-dimensional array of events for a given group
View 01-readme.md
@mrjones-plip
mrjones-plip / _readme.md
Last active Jan 17, 2021 — forked from gka/_readme.md
PHP Endpoint for Github Webhook URLs
View _readme.md

PHP Endpoint for Github Webhook URLs

If you love deploying websites using Github, but for some reason want to use your own server, this script might be exactly what you need.

  1. Put github.php somewhere on your PHP-enabled web server, and make it accessible for the outside world. Let's say for now the script lives on http://example.com/github.php