Skip to content

Instantly share code, notes, and snippets.

View popdemtech's full-sized avatar

Popular Demand Technology popdemtech

View GitHub Profile
@popdemtech
popdemtech / json.json
Last active December 20, 2022 06:25
A small and reusable JSON file
{
"id": "1",
"name": "Jayson",
"55rating": 0.55,
"house": "AB",
"capabilities":
{
"fishing": { "duration": "10000", "level": "master" },
"programming": { "duration": "4500", "level": "journeyman" },
"physics": { "duration": "140000", "level": "champ" }
@popdemtech
popdemtech / wordpress-docker-compose.yml
Created November 13, 2022 17:59
docker-compose.yml used for empyrehq wordpress site
version: '3'
services:
database:
image: mysql:5.7
volumes:
- database-data:/var/lib/mysql
restart: always
environment:
@popdemtech
popdemtech / example.html
Last active September 20, 2022 18:29
html to pdf with node wkhtmltopdf
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: 'freemono';
src: url("/usr/share/fonts/truetype/freefont/FreeMono.ttf") format('truetype');
}
@font-face {
@popdemtech
popdemtech / setup.sh
Created August 17, 2022 03:05
kitchen sink setup file for ubuntu. Usage: `. ./setup.sh`
#! /bin/bash
# Usage `. ./setup.sh`
# Notice the dot-space before the file name.
sudo apt-get update
echo "Checking for nginx"
if ! [-x "$(command -v nginx)"];then
sudo apt-get install nginx -y
@popdemtech
popdemtech / dot-space.sh
Created August 17, 2022 02:54
Execute a bash script in the current shell
#!/bin/bash
echo 'alias ppwwdd="pwd"' >> ~/.bashrc
source ~/.bashrc
ppwwdd
# Execute Shell Script Using . ./ (dot space dot slash)
# Executing a shell script using “dot space dot slash”
@popdemtech
popdemtech / gist.md
Created August 12, 2022 21:16
Intentionally throw a browser error on page load
@popdemtech
popdemtech / fixShortPageFooter.js
Last active August 8, 2022 20:54
Fix footer to bottom page if it is a short page
fixPageShort();
function fixPageShort() {
if(window.innerHeight > document.body.offsetHeight) {
document.getElementById("footer").style.position="fixed";
document.getElementById("footer").style.bottom=0;
document.getElementById("footer").style.right=0;
document.getElementById("footer").style.left=0;
document.getElementById("footer").style.width="100%";
}
}
@popdemtech
popdemtech / slideshow-ipad-macbookpro-obs-scene-collection.json
Created July 30, 2022 03:12
slideshow-ipad-macbookpro-obs-scene-collection
{"AuxAudioDevice1":{"balance":0.5,"deinterlace_field_order":0,"deinterlace_mode":0,"enabled":true,"flags":0,"hotkeys":{"libobs.mute":[],"libobs.push-to-mute":[],"libobs.push-to-talk":[],"libobs.unmute":[]},"id":"coreaudio_input_capture","mixers":255,"monitoring_type":0,"muted":false,"name":"Mic/Aux","prev_ver":453115908,"private_settings":{},"push-to-mute":false,"push-to-mute-delay":0,"push-to-talk":false,"push-to-talk-delay":0,"settings":{"device_id":"BuiltInMicrophoneDevice"},"sync":0,"versioned_id":"coreaudio_input_capture","volume":1.0},"current_program_scene":"slideshow only","current_scene":"slideshow only","current_transition":"Fade","groups":[],"modules":{"auto-scene-switcher":{"active":false,"interval":300,"non_matching_scene":"","switch_if_not_matching":false,"switches":[]},"decklink_captions":{"source":""},"output-timer":{"autoStartRecordTimer":false,"autoStartStreamTimer":false,"pauseRecordTimer":true,"recordTimerHours":0,"recordTimerMinutes":0,"recordTimerSeconds":30,"streamTimerHours":0,"streamT