Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# SetHomepages.sh
# Change Chrome and Safari Homepage
# This script assumes that default preference files for all three browsers have been installed
# with FUT/FEU options in Casper.
# Define homepage
@nathandarnell
nathandarnell / soundboard.cpp
Created November 2, 2017 23:36 — forked from hdo/soundboard.cpp
Arduino Soundboard Project with DFPlayer mini
#include <Arduino.h>
#define BUTTON_COUNT 36
#define KEYPAD_OUTPUT_BEGIN 2
#define KEYPAD_OUTPUT_END 7
#define KEYPAD_INPUT_BEGIN 8
#define KEYPAD_INPUT_END 13
#!/bin/bash
## https://crosstalksolutions.com/freepbx-polycom-directory-automation/
## Runs every hour from "nano -w /etc/crontab"
## http://thyrusgorges.com/post/generate-polycom-xml-directory-using-freepbx/
# Author: Thyrus Gorges
# Date: 2015/03/04
#The MIT License (MIT)
@nathandarnell
nathandarnell / polycom-dir-xslt.sh
Last active June 21, 2018 19:29
Sorts the Polycom directory and formats the XML to be prettier. Could be combined with "polycom-dir.sh" but keeping it separate now for testing
#!/bin/bash
# Sorts the Polycom directory file by last name
# That original file is produced by: https://crosstalksolutions.com/freepbx-polycom-directory-automation/
# XSL code taken from: https://stackoverflow.com/questions/28322438/sort-xml-in-alphabetic-order
# XSL file is at: https://gist.github.com/nathandarnell/0c7cac5e628a43b126f96d7c64970cf9#file-polycom-dir-xslt-xsl
# Runs every hour from "nano -w /etc/crontab"
@nathandarnell
nathandarnell / polycom-dir-xslt.xsl
Last active June 21, 2018 19:09
Sorts the Polycom directory file and is kept in /usr/local/sbin
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="@*|node()">
<xsl:copy><xsl:apply-templates select="@* | node()"/></xsl:copy>
</xsl:template>
<xsl:template match="item_list">
<xsl:copy>
<xsl:apply-templates select="@*|node()">
<xsl:sort select="ln"/>
</xsl:apply-templates>
@nathandarnell
nathandarnell / Code.gs
Created October 18, 2020 04:58 — forked from dexterlabora/Code.gs
Google Sheets Scripts with the Meraki Dashboard API
// Settings - Modify this with your values
// *************************
// User Defined in the Script
var API_KEY = '';
var ORG_ID = '';
var NET_ID = '';
var TIMESPAN = '';
// User Defined in a Sheet