Skip to content

Instantly share code, notes, and snippets.

@ethanbeyer
ethanbeyer / nginx-site-config.txt
Last active November 14, 2022 18:35
Ethan's Homestead Debug Info
more /etc/nginx/sites-enabled/test.local
server {
listen 80;
listen 443 ssl http2;
server_name .test.local;
root "/home/vagrant/sites/test.local";
index index.html index.htm index.php;
charset utf-8;
@ethanbeyer
ethanbeyer / greasemonkey-script.js
Last active July 2, 2020 20:18
Twitch Channel Currency Autoclicker
// ==UserScript==
// @name Twitch Channel Currency Clicker
// @version 2.1.1
// @grant *
// @include https://www.twitch.tv/*
// @require https://code.jquery.com/jquery-3.5.1.slim.min.js
// ==/UserScript==
// set this at the beginning
var oldLocation = location.href;
@ethanbeyer
ethanbeyer / countries.js
Last active January 31, 2020 16:55 — forked from shafiul/countries
Dynamic JS Country -> State Selects
/**
* Original script by: Shafiul Azam
* Modified by: Ethan Beyer
* Version 4.0
*
* Description: Inserts Countries and/or States as Dropdown List
*
* In Head section:
* ----------------
* <script type= "text/javascript" src = "countries.js"></script>
/**
* This function exports the Addendums as PDFs by merging the data from the .txt file in this directory
* with the fields in the PDF.
*
* It's wrapped in a function so it can return a NULL if there's an error.
*
* @author Ethan Beyer
* @version 1.0
*/
!(app.trustedFunction(
@ethanbeyer
ethanbeyer / youtube-bookmarklet.js
Created August 2, 2016 20:04
Open Current YouTube in same tab as embed (so it's full screen)
javascript:(function(){
var video_id = window.location.search.split("v=")[1];
var ampersandPosition = video_id.indexOf("&");
var ytplayer = document.getElementById("movie_player");
var $time = ytplayer.getCurrentTime();
$time = Math.round($time);
if(ampersandPosition != -1) {
video_id = video_id.substring(0, ampersandPosition);