Skip to content

Instantly share code, notes, and snippets.

View ctrlaltdylan's full-sized avatar

Dylan Pierce ctrlaltdylan

View GitHub Profile
@ctrlaltdylan
ctrlaltdylan / raspi2-kiosk.md
Created April 13, 2016 00:06
Tutorial for setting up a RasPi 2 to work as a lightweight kiosk.

Installing a minimal Arch Linux kiosk on a RasPi 2

Arch Linux is both lightweight and highly customizable, and is the perfect distro for creating a kiosk using the low-powered RasPi 2. Full details about Arch Linux on the RasPi 2 can be found on the [Official Arch Linux ARM wiki] (https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2).

Getting started

@ctrlaltdylan
ctrlaltdylan / default.conf
Last active January 19, 2024 02:05
Reverse proxy for Radarr, Sonarr, Deluge && Jackett for pretty URLs instead of ports (store in /etc/nginx/default.conf)
server {
location /sonarr {
proxy_pass http://localhost:8989/sonarr;
}
location /radarr {
proxy_pass http://localhost:7878/radarr;
}
location /jackett {
@ctrlaltdylan
ctrlaltdylan / http-response.js
Last active September 7, 2023 17:12
Pipedream HTTP response component
// To return a custom HTTP response, use $.respond() [requires HTTP trigger]
export default defineComponent({
props: {
body: {
type: 'object',
label: "Body",
description: "The payload to respond with",
default: {}
},
headers: {
@ctrlaltdylan
ctrlaltdylan / CreateRepo.js
Created December 6, 2022 14:12
Create Github Repository from a Pipedream Node.js Code Step
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
github: {
type: "app",
app: "github",
},
repo_name: {
type: "string",
label: "Repository Name",
export default {
name: "Pg Custom Action",
version: "0.0.1",
key: "pg-custom-action",
description: "",
props: {
query: {
type: 'string',
label: 'Query',
},
@ctrlaltdylan
ctrlaltdylan / apache.env.sh
Created June 14, 2022 16:23
Apache ENV file for gitpod
export APACHE_SERVER_NAME=$(gp url 8080 | sed -e s/https:\\/\\/// | sed -e s/\\///)
export APACHE_RUN_USER="gitpod"
export APACHE_RUN_GROUP="gitpod"
export APACHE_RUN_DIR=/var/run/apache2
export APACHE_PID_FILE="$APACHE_RUN_DIR/apache.pid"
export APACHE_LOCK_DIR=/var/lock/apache2
export APACHE_LOG_DIR=/var/log/apache2
@ctrlaltdylan
ctrlaltdylan / apache.conf
Created June 14, 2022 16:16
apache.conf for monorepo
# Apache httpd v2.4 minimal configuration
# see https://wiki.apache.org/httpd/Minimal_Config for documentation
ServerRoot ${GITPOD_REPO_ROOT}
PidFile ${APACHE_PID_FILE}
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
# Modules as installed/activated via apt-get
@ctrlaltdylan
ctrlaltdylan / gist:0677ef8e65efed2140a6df4739cc733f
Created May 5, 2022 18:12
Workflow polling example diagram
sequenceDiagram
participant Workflow
participant Service
autonumber
Workflow-)Service: POST /api/long-running-job
note over Workflow,Service: Create a long running job on the Service
rect rgb(82, 78, 183)
Workflow->Workflow: Delay
note left of Workflow: Delay 1 hour
@ctrlaltdylan
ctrlaltdylan / [[...slug.js]].js
Created February 25, 2021 13:44
Bullboard with Next JS
import nc from "next-connect";
const { setQueues, BullAdapter, router } = require("bull-board");
import emailQueue from 'queues/emailQueue'; // or wherever your queues lie
setQueues([
new BullAdapter(emailQueue),
]);
const handler = nc().use(
var private_key = postman.getEnvironmentVariable('private_key');
var public_key = postman.getEnvironmentVariable('public_key');
var method = request.method;
var content_type = 'application/json';
var content_md5 = '';
var request_url = request.url;
var request_uri = request_url.replace(/^.*\/\/[^\/]+/, '')
var timestamp = (new Date()).toGMTString();