Skip to content

Instantly share code, notes, and snippets.

View pfcbenjamin's full-sized avatar

Ben Volio pfcbenjamin

View GitHub Profile
@oleksiiha
oleksiiha / gist:74ed6db4cf116e19ed51fcc2dd2feceb
Last active April 15, 2024 03:18
Install Plexamp on HiFiBerryOS
Pre-requisits:
My build worked for me and my setup which includes: Raspberry Pi 3b, HiFiBerry DAC+ Standart, wired connection (for some reason connection to plexamp drops on wireless), HiFiBerryOS installed
You need version 9 of nodejs in your system, easiest way in my opinion to install custom version of nodejs and to not affect version 12 that is present in HiFIBerryOS, is to use nvm
1. Ssh to your hifiberry installation
2. Create bash profile file (this is required by nvm)
# touch ~/.profile
3. Install NVM
@simonwhatley
simonwhatley / GoogleDistance.gs
Last active February 27, 2023 14:21
Get the distance between 2 addresses in Google Sheets using Google Maps
/**
* Get the distance between 2 different addresses.
* @param {string} origin_address The origin/start address as string Eg. "102 Petty France, London, SW1H 9AJ".
* @param {string} destination_address The destination/end address as string Eg. "10 Whitechapel High Street, London, E1 8QS".
* @param {string} travel_mode The mode of travel as string. Default: DRIVING. Options: BICYCLING, TRANSIT, WALKING.
* @param {string} return_type The return type as string. Default: MILES. Options: KILOMETERS, MINUTES, HOURS, STEPS.
* @return the distance between 2 different addresses.
* @customfunction
*/
function GOOGLEDISTANCE(origin_address,destination_address,travel_mode,return_type) {
@pecigonzalo
pecigonzalo / mbox2gg.py
Last active November 21, 2023 11:11 — forked from jacksonj04/mbox2gg.pl
mbox to Google Groups
#! /usr/bin/env python
# Import a mbox file to a Google Group using https://developers.google.com/admin-sdk/groups-migration/index
# You'll need to install https://developers.google.com/api-client-library/python/
# and enable Groups Migration API, read prerequisits of the API SDK
from __future__ import print_function
import mailbox
import StringIO
@rwheaton
rwheaton / salesforce.js
Last active April 4, 2019 15:33 — forked from mobyjames/salesforce.js
Squarespace Forms Integration for Salesforce
// add this salesforce.js file to your scripts dir after enabling developer mode
// this gets included via entries in the site.region file
Y.namespace('Template').Salesforce = Class.create({
/*
baseUrl
oid
sqsFormSubmit
*/
initialize: function (config) {
@mygeekdaddy
mygeekdaddy / OmniFocus_Due_List_R2.scpt
Last active October 23, 2021 11:54
Generate MD file for tasks due within +/- 7d of current date (Rev 2)
(*
File: OmniFocus_Due_List.scpt
Revision: 1.1
Revised: 2019-02-10
Summary: Create taskpaper list of tasks due +/- 7d from current date.
-----------------------------------------------------------
Script based on Justin Lancy (@veritrope) from Veritrope.com
http://veritrope.com/code/write-todays-completed-tasks-in-omnifocus-to-a-text-file
@ttscoff
ttscoff / grab links.bookmarklet
Last active April 3, 2024 19:44
Create a bookmark and paste the code from `grab links.bookmarklet` into the url. Trigger it on a page containing links you want to save and then click the section of the page containing the links. A Markdown list of all links will be generated, and clicking the resulting list will select all for copying.
@GuyCarver
GuyCarver / image2base64.py
Created November 22, 2012 20:23
Pythonista image2base64
#covert an image in the clipboard to a 57x57 rgb icon and store base64 version of it into the clipboard.
#if an image is not in the clipboard the base64 string 'b64str' will be loaded and displayed.
#after running the 1st time replace the contents of b64str with the clipboard.
from PIL import Image
import clipboard
from StringIO import *
import base64
b64str="""