Skip to content

Instantly share code, notes, and snippets.


gregory nicholas gregorynicholas

Block or report user

Report or block gregorynicholas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gregorynicholas /
Created Nov 17, 2019 — forked from mogsdad/
Collection of Google Calendar related utility functions for Google Apps Script.

Google Calendar Utilities


Gets all events that occur within a given time range, and that include the specified guest email in the guest list.


gregorynicholas /
Created Nov 17, 2019 — forked from daichan4649/
spreadsheet のデータを JSON として読み込む(Google Apps Script)
function convertSheet2Json(sheet) {
// first line(title)
var firstRange = sheet.getRange(1, 1, 1, sheet.getLastColumn());
var firstRowValues = firstRange.getValues();
var titleColumns = firstRowValues[0];
// after the second line(data)
var lastRow = sheet.getLastRow();
var rowValues = [];
for(var rowIndex=2; rowIndex<=lastRow; rowIndex++) {
gregorynicholas / pullJSON.js
Created Nov 17, 2019 — forked from varun-raj/pullJSON.js
Google App Script To Fetch Data From JSON Webservice and Write them to google spreadsheet.
View pullJSON.js
function pullJSON() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheets = ss.getSheets();
var sheet = ss.getActiveSheet();
var url=""; // Paste your JSON URL here
var response = UrlFetchApp.fetch(url); // get feed
var dataAll = JSON.parse(response.getContentText()); //
View gist:8e8454c03fec0b240480dff4e7d14ec1
#!/usr/bin/env python
# To look at:
# To look at:
Playing around with CoreWLAN to return information about the wi-fi connection
gregorynicholas /
Created Oct 3, 2019 — forked from pudquick/
Using PrivateFrameworks to get marketing model information for Apple Macs without hitting their internet API (where possible) via python and pyobjc
# Tested on 10.11
# Note:
# The marketing information embedded in the ServerInformation.framework is not the same as what
# About This Mac displays - there are differences.
# For example:
# ServerInformation: 15" MacBook Pro with Retina display (Mid 2015)
# About This Mac: MacBook Pro (Retina, 15-inch, Mid 2015)
gregorynicholas /
Created Oct 3, 2019 — forked from erikng/
Make standalone "universal" FirmwareUpdater package for High Sierra
# Based on investigations and work by Pepijn Bruienne
# Expects a single /Applications/Install macOS Sierra*.app on disk
# Adapted from
# find the Install macOS and mount the embedded InstallESD disk image
echo "Mounting Sierra ESD disk image..."
gregorynicholas /
Created Oct 3, 2019 — forked from pookjw/
Enroll macOS Beta Seed without profile installation


Enroll macOS Beta Seed without profile installation


$ sudo /System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil 
usage: seedutil enroll SEED_PROGRAM
    seedutil unenroll
    seedutil current
gregorynicholas /
Created Oct 3, 2019 — forked from albertbori/
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac


This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.


  • Mac OSX 10+
  • Administrator privileges
gregorynicholas / Example.scpt
Created Oct 3, 2019 — forked from pudquick/Example.scpt
Make DMGs from folders
View Example.scpt
property destination_for_dmgs : "/Users/mike/Desktop"
on open the_items
repeat with an_item in the_items
set the_info to info for an_item
if kind of the_info is "Folder" then
set dmg_path to quoted form of (destination_for_dmgs & "/" & (name of the_info) & ".dmg")
set src_path to quoted form of POSIX path of an_item
set vol_name to quoted form of (name of the_info)
set command_str to "hdiutil create " & dmg_path & " -volname " & vol_name & " -srcfolder " & src_path
# Credit to frogor for the objc
from Foundation import NSBundle
import json
import objc
import os
import plistlib
import subprocess
You can’t perform that action at this time.