Skip to content

Instantly share code, notes, and snippets.

View codyzu's full-sized avatar

Cody Zuschlag codyzu

View GitHub Profile
@codyzu
codyzu / 2022-macbook-air-m2.md
Last active August 26, 2022 08:13
2022 macbook air m2
@codyzu
codyzu / notes.md
Last active February 1, 2022 12:00
Profalux volets / ConBee II / deCONZ / Phoscon / Homebridge / Homekit

Profalux Volets (shutters) with Homekit

Setup

  • 2 Profalux volets
  • 2 dedicated profalux remotes (1 for each volet) + 1 "global" remote that controls them simultaneously
  • Raspberry pi
  • ConBee II
  • deCONZ
  • Phoscon App
@codyzu
codyzu / index.js
Created November 30, 2020 20:34
Exam 1 Express Server
const express = require('express')
const app = express()
app.get('/', function (req, res) {
res.send('Hello World!')
})
// 👉👉 ADD YOUR ROUTE HERE! 👈👈
const functions = require("firebase-functions");
const admin = require("firebase-admin");
const {nanoid} = require('nanoid');
admin.initializeApp();
exports.withLock = functions.pubsub
.schedule("0 * * * *")
.onRun((context) => {
const { eventId, timestamp } = context;
@codyzu
codyzu / hp-pavillion-gaming-17-cd0002nf-tips-and-tricks.md
Last active March 23, 2020 08:47
Tips and tricks for HP Pavillion Gaming 17 cd0002nf
@codyzu
codyzu / darter-pro-tips-and-tricks.md
Last active May 25, 2022 14:01
Linux Tips and Tricks

PopOS (System76 Darter Pro)

Broken emojis in chrome

sudo apt remove fonts-noto-color-emoji
sudo apt install fonts-noto-color-emoji

reference

R.pipeWith(R.then, [getUserFromDatabase, replyOk, sendMessageToUser])(ctx);
const R = require('ramda');
const ctx = {
// ...
};
R.pipeWith(R.then, [getUserFromDatabase, sendMessageToUser, replyOk])(ctx);
async function getUserFromDatabase(ctx) {
const {
req: {
headers: {Authorization: userCred},
},
} = ctx;
const user = await db.getUserByCredential(userCred);
return {
...ctx,
user,
await sendMessageToUser(ctx);
await replyOk(ctx);