Skip to content

Instantly share code, notes, and snippets.

const express = require('express');
const app = express();
const PORT = 3009;
const APP_TIMEOUT = 1 * 60 * 1000; // 1 minute for the whole process
const HEARTBEAT_INTERVAL = 10 * 1000; // Send a heartbeat every 10 seconds
app.get('/stream', (req, res) => {
res.setHeader('Content-Type', 'text/plain; charset=utf-8');
res.setHeader('Transfer-Encoding', 'chunked');
This file has been truncated, but you can view the full file.
[{"type":4,"data":{"href":"https://design.paragontruss.com/6dc8767b-28a4-4888-9426-1a6142e377c2/4ef36a49-98d7-4bfb-bd68-84421ce8d68a/componentDesign/4ef36a49-98d7-4bfb-bd68-84421ce8d68a/0","width":1920,"height":919},"timestamp":1730903667651},{"type":2,"data":{"node":{"type":0,"childNodes":[{"type":1,"name":"html","publicId":"","systemId":"","rootId":4205,"id":4206},{"type":2,"tagName":"html","attributes":{"lang":"en"},"childNodes":[{"type":2,"tagName":"head","attributes":{},"childNodes":[{"type":2,"tagName":"style","attributes":{"data-emotion":"css-global","data-s":"","_cssText":"@-webkit-keyframes mui-auto-fill { \n 0% { display: block; }\n}@keyframes mui-auto-fill { \n 0% { display: block; }\n}@-webkit-keyframes mui-auto-fill-cancel { \n 0% { display: block; }\n}@keyframes mui-auto-fill-cancel { \n 0% { display: block; }\n}"},"childNodes":[{"type":3,"textContent":"","isStyle":true,"rootId":4205,"id":4210}],"rootId":4205,"id":4209},{"type":2,"tagName":"style","attributes":{"data-emotion":"css-global","d
@enxoco
enxoco / rrweb.js
Created November 2, 2024 01:27
rrweb.js
parcelRequire=function(e,t,r,n){var o,a="function"==typeof parcelRequire&&parcelRequire,i="function"==typeof require&&require;function s(r,n){if(!t[r]){if(!e[r]){var o="function"==typeof parcelRequire&&parcelRequire;if(!n&&o)return o(r,!0);if(a)return a(r,!0);if(i&&"string"==typeof r)return i(r);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}u.resolve=function(t){return e[r][1][t]||t},u.cache={};var c=t[r]=new s.Module(r);e[r][0].call(c.exports,u,c,c.exports,this)}return t[r].exports;function u(e){return s(u.resolve(e))}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=t,s.parent=a,s.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]};for(var l=0;l<r.length;l++)try{s(r[l])}catch(e){o||(o=e)}if(r.length){var c=s(r[r.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}if(parcelRequire=s,o)throw o;return s}({"node_module
var serveAreaInputs = jQuery('label:contains(In what area would you like to serve?)').parent().find('input')
var serveAreas = []
var serveAreaEmails = []
var emailField = document.querySelector('[data-email]').dataset.email
serveAreaInputs.on('change', function(e) {
let val = e.target.value
let checked = e.target.checked
const index = serveAreas.indexOf(val)
@enxoco
enxoco / Vagrantfile
Created July 6, 2022 17:32
Basic Vagrantfile example using Docker.
Vagrant.configure("2") do |config|
config.vm.box = "generic/centos7"
config.vm.synced_folder ".", "/vagrant"
config.vm.synced_folder "./html", "/var/www/html"
config.vm.provider "docker" do |d|
d.image = "php:7.4.23-apache"
end
# config.vm.provision :shell, path: "bootstrap.sh"
config.vm.network :forwarded_port, guest: 80, host: 4567
end
@enxoco
enxoco / docker-compose.yml
Created July 1, 2022 13:27
Drupal docker
version: '3'
services:
web:
image: osiolabs/drupaldevwithdocker-php:7.4
volumes:
- ./public_html:/var/www/html
# Our .env file needs to be outside the web root for drupal to function.
command: cp .env /var/www/html/.env
ports:
- "8080:80"
@enxoco
enxoco / config
Created June 30, 2022 13:37
Example of an SSH config file. Allows SSH connections without having to remember ip/hostname/usernames
# These are just examples of some of the options. Modify for your own setup.
# This file should be ~/.ssh/config with no extension. Once you have this setup you can simply run:
# ssh staging-server to connect to 192.168.1.10 with the staging-user and ssh key
Host staging-server
HostName 192.168.1.10
User staging-user
Port 2202
IdentityFile ~/.ssh/id_rsa
Host tyrell
@enxoco
enxoco / .env.example
Created June 29, 2022 00:23
Example of creating a development environment in Docker for a Laravel app. Uses docker compose to spin up nginx/mysql and laravel app.
APP_NAME="Laravel React To Do App"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=db
@enxoco
enxoco / pm2_start_yarn.sh
Created June 16, 2022 13:14
PM2 Start command
pm2 start yarn --interpreter bash --name api -- start
# Setup NPM to run without sudo.
# Choose your shell of choice
SHELL='zshrc'
mkdir "${HOME}/.npm-packages"
echo NPM_PACKAGES="${HOME}/.npm-packages" >> ${HOME}/.${SHELL}
echo prefix=${HOME}/.npm-packages >> ${HOME}/.npmrc
echo NODE_PATH=\"\$NPM_PACKAGES/lib/node_modules:\$NODE_PATH\" >> ${HOME}/.${SHELL}
echo PATH=\"\$NPM_PACKAGES/bin:\$PATH\" >> ${HOME}/.${SHELL}
# echo source "~/.bashrc" >> ${HOME}/.bash_profile