Skip to content

Instantly share code, notes, and snippets.

@dhh
dhh / linux-setup.sh
Last active June 5, 2024 20:22
linux-setup.sh
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
Support Codes
import {
FaCamera,
FaFire,
FaHome,
FaPaintBrush,
FaVideo,
} from "react-icons/fa";
import { v4 as uuidv4 } from "uuid";
@dannberg
dannberg / obsidian-meeting-moc.txt
Last active May 18, 2024 17:03
Dann Berg's Meeting MOC document for Obsidian. Full instructions for implementation here: https://dannb.org/blog/2023/obsidian-meeting-note-template/. See the YouTube tutorial here: https://youtu.be/Ud16HOQoS5Q
[[+Home]] %% tags:: #MOC %%
# Meetings MOC
Meetings are timestamped events with other people, where information is exchanged and collected. Meeting notes are intrinsically ephemeral. They're stored in a separate Space than other Umami notes (`Timestamps/Meetings`) and rarely reviewed. If there's information in a meeting that needs to be accessed later, it should be moved into a more evergreen note in the Umami folder.
**Template:** [[Template, Meeting]]
```meta-bind-button
label: New Meeting
hidden: false
@SgtBatten
SgtBatten / frigate_0.11_notification.yaml
Last active December 7, 2023 20:09 — forked from hunterjm/frigate_0.10_notification.yaml
Frigate Notifications have moved
blueprint:
name: Frigate Notifications by SgtB have moved
description: |
## ANNOUNCEMENT
I have moved from this gist to a github repositry.
Please checkout https://github.com/SgtBatten/HA_blueprints for the latest versions
domain: automation
@neilio
neilio / switch-apps.applescript
Created May 4, 2022 13:30
Set up laptop for work
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Switch to FreshBooks
# @raycast.mode silent
# Optional parameters:
# @raycast.icon 🤖
@drewkerr
drewkerr / get-focus-mode.js
Last active May 29, 2024 16:16
Read the current Focus mode on macOS Monterey (12.0+) using JavaScript for Automation (JXA)
const app = Application.currentApplication()
app.includeStandardAdditions = true
function getJSON(path) {
const fullPath = path.replace(/^~/, app.pathTo('home folder'))
const contents = app.read(fullPath)
return JSON.parse(contents)
}
function run() {
version: '2'
services:
mauticdb:
image: percona/percona-server:5.7
container_name: mauticdb
volumes:
- mysql_data:/var/lib/mysql
environment:
@clairechabas
clairechabas / index.js
Created May 9, 2020 20:17
File upload API endpoint handling uploads to Firebase Cloud Storage | #NodeJS #ExpressJS #Multer #Firebase #GCloudStorage #GCP
require('dotenv').config();
const express = require('express');
const app = express();
const cors = require('cors');
const bodyParser = require('body-parser');
const { Storage } = require('@google-cloud/storage');
const multer = require('multer');
const port = process.env.API_PORT || 8080;
app.use(bodyParser.json());
@chris-sev
chris-sev / setup.sh
Last active February 10, 2024 03:17
Mac Setup
# how to run this thingy
# create a file on your mac called setup.sh
# run it from terminal with: sh setup.sh
# heavily inspired by https://twitter.com/damcclean
# https://github.com/damcclean/dotfiles/blob/master/install.sh
# faster dock hiding/showing (run in terminal)
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
@andywer
andywer / _readme.md
Last active March 7, 2024 05:52
React - Functional error boundaries

React - Functional error boundaries

Thanks to React hooks you have now happily turned all your classes into functional components.

Wait, all your components? Not quite. There is one thing that can still only be implemented using classes: Error boundaries.

There is just no functional equivalent for componentDidCatch and deriveStateFromError yet.

Proposed solution