Skip to content

Instantly share code, notes, and snippets.

@quinncomendant
quinncomendant / umbrella
Last active Aug 4, 2020
[WARNING: this script no longer works with newer versions of the roaming client software, which now has a *Disable* control in its menu so use that instead.] Cisco Umbrella Roaming Client management script for Mac OS X. This makes it easy to manage the background processes of umbrella to start, stop, restart, sleep and get status.
View umbrella
#!/bin/bash
# Quinn Comendant <quinn@strangecode.com>
# https://gist.github.com/quinncomendant/3be731567e529415d5ee
# Since 25 Jan 2015
# Version 1.2.1
# q 13942 0.0 0.3 4408332 22096 ?? SN 7:32PM 0:00.27 /Applications/OpenDNS Roaming Client/RoamingClientMenubar.app/Contents/MacOS/RoamingClientMenubar
# nobody 13937 0.0 0.1 4296740 5164 ?? Ss 7:31PM 0:00.06 /usr/local/sbin/dnscrypt-proxy --user nobody --local-address=127.0.0.1:53 --plugin=libdcplugin_erc.so -d
# root 13903 0.0 0.2 4366308 13752 ?? SNs 7:31PM 0:00.25 /Library/Application Support/OpenDNS Roaming Client/dns-updater
View Twitter interview solution
def solver(array):
local_max_indexes =[]
local_max_indexes.append(0)
left_max = local_max_indexes[0]
last_ex_ind = [0];
for i in xrange(1, len(array) - 1):
#print array[i-1], array[i], array[i+1]
if(array[i] > array[i-1] and array[i] > array[i+1]):
if(array[i] >= array[left_max]):
local_max_indexes.append(i)
You can’t perform that action at this time.