Skip to content

Instantly share code, notes, and snippets.

document.querySelectorAll("[title='Add to Card']").forEach((e, i) => {
setTimeout(() => {e.click()}, i*5000)
})
@taxilian
taxilian / 1- README.md
Last active July 9, 2019 15:24
Example nginx config to reverse proxy to three different octoprint servers from one domain

Purpose

I have three printers; each uses a raspberry pi that runs OctoPrint. I wanted to be able to give people a single page to see all of the webcams, what they are printing with ETL (est time left), and what the current temperatures are.

This demonstrates how I did that. Email me at richard@hamstudy.org if you'd like to see a live demo -- I don't want every bot on the web looking at my cameras and using CPU cycles.

License

@halr9000
halr9000 / README.md
Last active February 27, 2022 05:00
How to make fake data in Splunk using SPL

How to make fake data in Splunk using SPL

Sometimes, you need to fake something in Splunk. Might be during development and you don't feel like writing a real search, but you really need a number for a dashboard panel to look right. Maybe you are helping someone with a hairy regex, and you don't want to index data just to test it on your instance. Whatever the reason, here are some searches that have helped me out.

Note that when using these techniques, you are not going through the indexing

# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
@boneskull
boneskull / proxy
Created January 26, 2016 00:43
example nginx config to reverse proxy a node-red server (websocket support)
server {
listen 80;
server_name your_server_name;
access_log /var/log/nginx/access.log;
location / {
proxy_pass http://localhost:1880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@Dirrk
Dirrk / plex-status.js
Last active June 21, 2023 23:09
Plex status.js
// jscs: disable
/*
Setup with crontab:
* * * * * /usr/bin/node /home/dirrk/scripts/plex-info/index.js >> /var/log/plex/plexstatus.log 2>/dev/null
Setup splunk to consume json with timestamp from utc on timestamp field
Example dashboard: http://imgur.com/E5jBA7S
*/
var wreck = require('wreck'),
[deployment-client]
clientName = SecondaryDeploymentServer
reloadDSOnAppInstall = true
[target-broker:PrimaryDeploymentServer]
targetUri = <deployment_master_fqdn>:<deployment_master_mgmt_port>
@jvenator
jvenator / gist:9672772a631c117da151
Last active April 28, 2024 01:09
PDFtk Server Install Workaround for Mac OS X

Installing PDFtk Server edittion on your Mac

This workaround install is necessary because PDFtk was pulled from homebrew-cask due to issues with it aggressively overwriting file permissions that could impact other installed libraries. See this homebrew-cask issue.
The following steps worked on Mac OS X 10.10.1 with a standard brew installation for the PDFtk Mac OS X server libary version 2.02.
All Terminal commands separated by a full line space. Some commands wrap into multiple lines.

Download and extract the Mac OS X server install pacakge

@stamler
stamler / install_splunk.sh
Created December 10, 2014 21:17
Install Splunk Enterprise 6.2 on CentOS 7 Minimal as a non-root user systemd service and enable syslog on port 514 and http on port 80
#!/bin/bash
# Install Splunk 6.2 on CentOS 7 as a non-root user service that runs on boot with
# systemd. This script also opens the firewall to allow syslog on UDP port 514. Since
# we're running Splunk as non-root, this port is then forwarded to 5514. Configuring a
# syslog input in slunk on UDP 514 will gather this data. Must be run as root
# Create Account
useradd splunk
groupadd splunk