Skip to content

Instantly share code, notes, and snippets.

View danelowe's full-sized avatar

danelowe

  • Auckland, New Zealand
View GitHub Profile
@danelowe
danelowe / flake.nix
Created October 8, 2024 04:12
Set Up Rails Dev env
# initdb -D .direnv/postgres/data
#
{
description = "Ruby dev";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
@danelowe
danelowe / edge.lua
Last active October 1, 2024 08:33
Hammerspoon copy markdown link
local module = {}
module.activeTabDetails = function()
local success, result = hs.osascript.javascript([[
(() => {
// chromium based browsers will likely have the same API, just different bundle ID or application name.
// For other browsers, can refer to the application's dictionary in script editor
const edge = Application("com.microsoft.edgemac");
if (!edge.frontmost()) {
return
import { Component, defineAsyncComponent, defineComponent, h } from 'vue'
export function hydrateNever(componentOrFactory: Component): Component {
return makeHydrationBlocker(componentOrFactory, {
beforeCreate() {
this.never = true
},
})
}
@danelowe
danelowe / README.markdown
Last active March 14, 2024 22:25
Mopidy and librespot (spotify connect)

Method taken from https://github.com/pimusicbox/pimusicbox

Assuming mopidy and Iris etc are already installed, we need to install mpc, so that we can stop playback on mopidy when we use spotify connect

sudo apt-get install mpc 

Then we install the easiest librespot spotify connect system