Skip to content

Instantly share code, notes, and snippets.

View brucebentley's full-sized avatar

Bruce Bentley brucebentley

View GitHub Profile
@brucebentley
brucebentley / Userscript Utilities.md
Last active January 6, 2022 05:02
Utilities used by my ever growing library of userscripts.
@backslash-f
backslash-f / .config
Last active October 19, 2023 20:39
Gist for neofetch .config
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
#
# brew install neofetch
# mkdir ~/.config/neofetch
# touch config.conf
# pbpaste > config.conf
print_info() {
info title
@brucebentley
brucebentley / install-asdf.sh
Last active November 28, 2023 22:02
Example script to install ASDF along with some common plugins & their latest versions.
#!/usr/bin/env bash
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Update Homebrew:
# - - - - - - - - - - - - - - - - - - - - - - - - -
brew update
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Install asdf dependencies:
# - - - - - - - - - - - - - - - - - - - - - - - - -
@Paraphraser
Paraphraser / IOTstackPullRequest.md
Last active January 28, 2023 17:26
Preparing IOTstack Pull Requests

Preparing a Pull Request for IOTstack

If you want to fix a bug or propose an enhancement for IOTstack, you will need to prepare a Pull Request (PR).

Please don't try to do anything in this gist inside an ~/IOTstack folder on a Raspberry Pi that is also being used to run your Docker containers. It's easy to get confused and you could accidentally break your own working IOTstack.

You can do everything on the same Raspberry Pi that is running your IOTstack but it's usually easier to work on a desktop or laptop. If you accept this advice, there's no risk of breaking your running IOTstack.

This guide barely scratches the surface of Pull Requests. There is lots of advice on GitHub and Google will find plenty of hits for any question you might have.

@marco79cgn
marco79cgn / spotify-now-playing.js
Last active April 11, 2025 23:05
A Scriptable iOS widget that shows what‘s playing on Spotify
let spotifyCredentials
let widget = await createWidget()
Script.setWidget(widget)
Script.complete()
async function createWidget() {
let widget = new ListWidget()
let spotifyIcon = await getImage("spotify-icon.png")
widget.backgroundColor = new Color("1e2040")
@chandraseta
chandraseta / terminal_upgrade.sh
Last active August 2, 2021 05:40
MacOS Terminal upgrade script
#!/bin/bash
# homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# zsh
brew install zsh zsh-completions
# oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
@jonathanMelly
jonathanMelly / vid-to-gif.sh
Last active January 20, 2025 10:44 — forked from anonymous/vid-to-gif.sh
video 2 gif converter
#!/bin/bash
# rev4 - changes suggested by KownBash https://www.reddit.com/r/bash/comments/5cxfqw/i_wrote_a_simple_video_to_gif_bash_script_thought/da19gjz/
# Usage function, displays valid arguments
usage() { echo "Usage: $0 [-f <fps, defaults to 15>] [-w <width, defaults to 480] inputfile" 1>&2; exit 1; }
# set input variable to the first option after the arguments
input="${1}"
@atnbueno
atnbueno / click-to-delete.user.js
Last active August 22, 2023 04:29
A userscript to delete page elements when clicked twice while pressing Alt, Control, and Shift simultaneously
// ==UserScript==
// @name Click to delete
// @author Antonio Bueno
// @namespace userscripts.atnbueno.com
// @description This script deletes page elements if clicked twice while simultaneously pressing Alt, Control, and Shift
// @version 2.0
// @grant none
// ==/UserScript==
/*
@spencerwooo
spencerwooo / termiWidget.js
Last active September 22, 2024 21:46
🍋 TermiWidget - Terminal-like Widget for iOS 14, made with Scriptable.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: quote-right;
// Change these to your usernames!
const user = "spencer"
const jike = "4DDA0425-FB41-4188-89E4-952CA15E3C5E"
const telegram = "realSpencerWoo"
const github = "spencerwooo"
#!/bin/bash
touch ssh
cat <<EOF > wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=hk
network={
ssid="<Name of your wireless LAN>"
psk="<Password for your wireless LAN>"