Skip to content

Instantly share code, notes, and snippets.

@raspberrypisig
raspberrypisig / my-custom-card.js
Created January 14, 2024 01:46 — forked from thomasloven/my-custom-card.js
Simplest custom card
// Simplest possible custom card
// Does nothing. Doesn't look like anything
class MyCustomCard extends HTMLElement {
setConfig(config) {
// The config object contains the configuration specified by the user in ui-lovelace.yaml
// for your card.
// It will minimally contain:
// config.type = "custom:my-custom-card"
@raspberrypisig
raspberrypisig / winstall.ps1
Created January 5, 2024 23:43 — forked from beamop/winstall.ps1
My winget powershell script to download my apps using winget (Windows Package Manager for Windows 10)
winget install --id=Google.Chrome -e ; winget install --id=Mozilla.Firefox -e ; winget install --id=Discord.Discord -e ; winget install --id=WhatsApp.WhatsApp -e ; winget install --id=OpenJS.Nodejs -e ; winget install --id=Microsoft.WindowsTerminal -e ; winget install --id=Amazon.AWSCLI -e ; winget install --id=CPUID.CPU-Z -e ; winget install --id=Cryptomator.Cryptomator -e ; winget install --id=hiyohiyo.CrystalDiskInfo -e ; winget install --id=Git.Git -e ; winget install --id=plex.plexmediaplayer -e ; winget install --id=Microsoft.PowerToys -e ; winget install --id=SlackTechnologies.Slack -e ; winget install --id=Microsoft.Skype -e ; winget install --id=Valve.Steam -e ; winget install --id=Spotify.Spotify -e ; winget install --id=Microsoft.Teams -e ; winget install --id=Ubisoft.Uplay -e ; winget install --id=Microsoft.VisualStudioCode -e ; winget install --id=RARLab.WinRAR -e ; winget install --id=WiresharkFoundation.Wireshark -e
@raspberrypisig
raspberrypisig / Install-ChocoAndScoop.ps1
Created January 5, 2024 23:34 — forked from Jeff-Lewis/Install-ChocoAndScoop.ps1
Install Chocolatey and Scoop package managers for Windows + basic set of utilities and software
Function Install-Scoop {
New-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" `
-propertyType ExpandString `
-name "SCOOP_GLOBAL" `
-value "${ENV:PROGRAMDATA}\scoop"
Invoke-WebRequest 'https://get.scoop.sh' | Invoke-Expression
'scoop install Git-with-OpenSSH Sudo Which --global' | Set-Content -path temp_script.ps1
@raspberrypisig
raspberrypisig / config.yml
Created June 7, 2023 02:20 — forked from yermulnik/config.yml
GH CLI multi-account switch
git_protocol: ssh
aliases:
personal: '!cp ~/.config/gh/hosts.yml.personal ~/.config/gh/hosts.yml && gh auth status'
work: '!cp ~/.config/gh/hosts.yml.work ~/.config/gh/hosts.yml && gh auth status'
@raspberrypisig
raspberrypisig / zcc.md
Created July 14, 2022 22:38 — forked from kassane/zcc.md
Zig compiler on C/C++ projects - CMake, Meson and other

Unix-like

$> export CC="zig cc $@"
$> export CXX="zig c++ $@"
...
# your build system
$> cmake or meson - commands
@raspberrypisig
raspberrypisig / api_ref.txt
Created June 11, 2022 12:11 — forked from samtherussell/api_ref.txt
Logitech SqueezeServer JSONRPC API
Squeezebox API
--------------
This document outlines the JSON RPC interface with a squeezeserver to control and obtain information about squeezeboxes.
JSON : JavaScript Object Notation
RPC : Remote Procedure Call
Uses POST requests sent to:
http://<squeezeserver_address>:9000/jsonrpc.js
@raspberrypisig
raspberrypisig / youtube-mp3.sh
Created June 11, 2022 11:47 — forked from jebog/youtube-mp3.sh
Download and Add Metadata to MP3 with Youtube-dl
youtube-dl -x --continue --add-metadata --embed-thumbnail --audio-format mp3 --audio-quality 0 --metadata-from-title="%(artist)s - %(title)s" --prefer-ffmpeg -o "%(title)s.%(ext)s" $1
@raspberrypisig
raspberrypisig / nginx.conf
Last active August 19, 2020 11:59 — forked from foxxyz/nginx.conf
Serve current directory via nginx
# Extremely basic development setup to serve the current directory at http://localhost:9001
# Start nginx in this directory with `nginx -p . -c nginx.conf`
# Stop nginx with `nginx -p . -s stop`
events {}
http {
# Serve files with correct mimetypes on OSX
# location may have to be adjusted depending on your OS and nginx install
include /usr/local/etc/nginx/mime.types;
@raspberrypisig
raspberrypisig / zsh-elapsed-time.md
Created June 24, 2020 08:12 — forked from knadh/zsh-elapsed-time.md
Elapsed and execution time for commands in ZSH

Elapsed and execution time display for commands in ZSH

Append this to your ~/.zshrc file.

function preexec() {
 timer=$(($(date +%s%0N)/1000000))
@raspberrypisig
raspberrypisig / clock.html
Created April 28, 2020 22:16 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >