Skip to content

Instantly share code, notes, and snippets.

@kusold
kusold / app-script.js
Created December 12, 2023 00:02
Sync addresses from Contacts to Google Sheets
function fetchContactAddress() {
const contacts = getAllContacts();
console.log(`Expected: ${contacts.totalItems} \t Actual: ${contacts.connections.length}`)
// Example Entry
//console.log(contacts.connections.find(contact => contact.addresses))
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var range = sheet.getRange("C2:C"); // Column with the contact name
var values = range.getValues();
@kusold
kusold / frigate_0.10_notification.yaml
Last active November 1, 2022 01:09 — forked from hunterjm/frigate_0.10_notification.yaml
Frigate 0.10 Notifications
blueprint:
name: Frigate Notification (0.10.0)
description: |
## Frigate Mobile App Notification
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but include an actionable notification allowing you to view the clip and snapshot.
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1].
### Software Version Requirements
@kusold
kusold / gist:b7af774035f41b3a9d7b
Created July 27, 2015 16:12
Npm scripts section
"scripts": {
"build": "npm run build-js",
"build-go": "go build",
"build-js": "npm run webpack",
"serve": "npm run serve-go",
"serve-go": "./my-binary",
"watch": "npm run watch-js",
"watch-go": "watch 'go test ./... && npm run build-go && npm run serve-go' `npm run utils-list-dirs-go -s` --wait 3 --ignoreDotFiles",
@kusold
kusold / gist:9096105
Created February 19, 2014 16:49
Keybase.io
### Keybase proof
I hereby claim:
* I am kusold on github.
* I am mike (https://keybase.io/mike) on keybase.
* I have the public key with fingerprint ACD0 4A19 3DA4 2890 3E2A  2E76 E56B F5EF 5E57 FEBF
To claim this, I am signing this object:
@kusold
kusold / STRSTRFasta.psuedo
Created November 20, 2012 03:47
STRSTR Fasta
string = "foobarfoofoobarbar"
list_of_dupes = []
for(int i = string.length; i > 1; i--)
{
slice_size = string.length / i;
temp_string = string
slice_to_check_for_uniqueness = temp_string.slice(FROM 0, TO slice_size); #I'm assuming slice consumes.
while(temp_string.contains(slice_to_check_for_uniqueness) != null)
{
@kusold
kusold / seniorcrawl.rb
Created June 7, 2012 16:09
Fun little Pseudo code to celebrate
def seniorcrawl
if isGraduating?
drink = 0
while(!passedOut)
drink++
end
takeMeHome
end
end
@kusold
kusold / grails-version.sh
Created April 30, 2012 15:20
Switch Grail's Versions using Symlinks.
#!/bin/sh
##
## Switches grails versions by changing the the symlink ~/grails to a
## ~/grails-$VERSION
##
## Author: Dan Lynn (dan@danlynn.com)
## Modified: Mike Kusold (Kusold@gmail.com)
if [ -z "$1" ]; then
@kusold
kusold / gist:2385501
Created April 14, 2012 16:14 — forked from axelav/gist:1839777
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@kusold
kusold / homework1.py
Created April 4, 2012 02:00
CSE 680 Homework 1
import time
def worthlessCalculator(n):
if n <= 3:
return 5
output = (3 * worthlessCalculator(n-1) + 5 * worthlessCalculator(n-3) + 7 * worthlessCalculator(n-4) + 11) % 15490549
return output
input = -1
@kusold
kusold / Week2-3.4.js
Created January 17, 2012 07:12
Code Academy: Week 2 - Year of Code 3.4. They won't let this pass.
var isOdd = function (n) {
if (n % 2 === 0) {
return false;
} else {
return true;
}
};
var isEven = function (n) {
if (n % 2 === 0) {