Skip to content

Instantly share code, notes, and snippets.

View LewisLebentz's full-sized avatar

Lewis Lebentz LewisLebentz

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am lewislebentz on github.
  • I am lewislebentz (https://keybase.io/lewislebentz) on keybase.
  • I have a public key ASDA6H_JHJmuE2YdZX6bOg02uhQCdRpxzCSWB4kusR2Dogo

To claim this, I am signing this object:

@LewisLebentz
LewisLebentz / chrome-version.sh
Created March 10, 2017 12:49
Bash script to get the latest version number of Chrome for Mac
View chrome-version.sh
curl -s https://omahaproxy.appspot.com/history | awk -F',' '/mac,stable/{print $3; exit}'
@LewisLebentz
LewisLebentz / update-chrome.sh
Created March 8, 2017 21:32
Downloads the latest Google Chrome DMG file and installs it on a Mac
View update-chrome.sh
#!/bin/sh
dmgfile="googlechrome.dmg"
volname="Google Chrome"
logfile="/Library/Logs/GoogleChromeInstallScript.log"
url='https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg'
/bin/echo "--" >> ${logfile}
@LewisLebentz
LewisLebentz / chrome-latest-ea.py
Last active December 12, 2021 05:52
Python script to get the latest version number of Chrome from Google and compare it to the version of Chrome installed on the local Mac. Then updates an Extension Attribute in Jamf Pro with either 'Latest' or 'Old'.
View chrome-latest-ea.py
#!/usr/bin/python
import json
import urllib2
import os.path
import plistlib
url = 'http://omahaproxy.appspot.com/all.json'
resp = urllib2.urlopen(url)
@LewisLebentz
LewisLebentz / groups.html
Created February 7, 2017 17:24
Form submit to getGroup.gs
View groups.html
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Groups</title>
</head>
<body>
<div align="center">
<!--<body bgcolor='ce010b'>-->
<font color="fa0029" face="ubuntu">
<br>
@LewisLebentz
LewisLebentz / getGroup.gs
Created February 7, 2017 17:20
Google Apps Script to find all members in a group
View getGroup.gs
function doGet(e){
var input = e.parameter.email;
Logger.log(input);
if (input == "")
{
return HtmlService.createHtmlOutput("<h2>fail</h2>")
}
return HtmlService.createHtmlOutput(listGroupMembers(input))
};
View post.py
#!/usr/bin/env python
import json
from urllib2 import Request, urlopen
def post(event, context):
V2TOKEN = 'enter_token_here'
ROOMID = enter_room_id_here
# API V2, send message to room:
url = 'https://api.hipchat.com/v2/room/%d/notification' % ROOMID