Skip to content

Instantly share code, notes, and snippets.

View emcniece's full-sized avatar
🔧
DevOps Engineer @ Workday

Eric McNiece emcniece

🔧
DevOps Engineer @ Workday
View GitHub Profile
@emcniece
emcniece / p3quick.sh
Last active July 14, 2023 22:34
Proxmark3 quickstart
brew tap proxmark/proxmark3
brew install proxmark3
proxmark3 /dev/tty.usbmodem214401
lf hid read 1
# present card
# read the tag id and copy it
# place the ring on the LF antena, have the antenna cutting the ring in half (don't just put it in the middle)
lf hid clone SOMEHEXVALUE
# remove ring
lf hid read 1
@emcniece
emcniece / package-lock.json
Created January 15, 2023 07:31
cncjs package-lock.json
{
"name": "cncjs-app",
"version": "1.9.27-20230115-e163c2c2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cncjs-app",
"version": "1.9.27-20230115-e163c2c2",
"license": "MIT",
@emcniece
emcniece / esphome-test-ble.yaml
Last active November 1, 2022 05:03
Ultraloq BLE service inspection via ESPHome
esphome:
name: test-ble
platform: ESP32
board: mhetesp32minikit
esp32_ble_tracker:
ble_client:
- mac_address: F0:5E:CD:BB:21:07
id: potting_shed_ble_client
<?php
/*
Firstline Dump Tool
emcniece@gmail.com | Dec. 1 2015
A handy tool for analyzing the first line of each php file,
which is usually where hacks get injected.
Visit in a browser to activate.
*/
@emcniece
emcniece / parse-crd-utilitybill.py
Created December 31, 2020 21:35
Parse CRD utility water bill PDF
from pdfreader import SimplePDFViewer
def to_float(string):
return float(string.strip())
def extract_usage_from_pdf(file_name):
fd = open(file_name, "rb")
viewer = SimplePDFViewer(fd)
@emcniece
emcniece / simple-custom-observable.py
Last active June 30, 2019 21:56
Python3 RxPy 3 Custom Observable Creation Example
# Example: Custom observable creation for switchmapping.
# Library: https://github.com/ReactiveX/RxPY
# Requires: `Rx==3.0.0b4` or greater. `pip3 install --pre rx`
import rx
from rx import operators as op
import time
# Accept a value (emission), return an observable that doubles its input.
# Sleeps to simulate synchronous behaviour.
@emcniece
emcniece / docker-compose.yml
Last active January 7, 2019 04:54
Simple WordPress Docker Stack
version: '3.1'
services:
wordpress:
image: wordpress
restart: always
ports:
- 8080:80
environment:
@emcniece
emcniece / README.md
Last active June 19, 2018 19:41
Testing Concourse + Traefik for a text/event-stream log reading problem

For debugging traefik/traefik#2576

Includes 2 docker-compose files: one outdated (Concourse 3.9.0, Traefik 1.5.4), the other updated (Concourse 3.14.0, Traefik 1.6.4). Both appear to work fine and not exhibit the "text/event-stream" network request problem where logs can't be displayed.

# Copy files into a directory.
# For this demo, we'll assume `contraef`.
# This directory name affects the access URL because docker-compose creates
# the stack with this name. You can change it, but watch for reoccurrences.
mkdir contraef
@emcniece
emcniece / divi-custom-modules.php
Created January 13, 2016 10:11
Divi Theme Image and Gallery Modules with Thumbnail Size Selection
// Add this to the same directory as your functions.php
<?php
class CITTA_Builder_Module_Image extends ET_Builder_Module {
function init() {
$this->name = __( 'Custom Image', 'et_builder' );
$this->slug = 'et_pb_custom_image';
$this->whitelisted_fields = array(
'src',
'img_size',
var webpack = require('webpack');
var path = require('path');
var fs = require('fs');
var nodeModules = fs.readdirSync('node_modules')
.filter(function(x) {
return ['.bin'].indexOf(x) === -1;
});
module.exports = {