Skip to content

Instantly share code, notes, and snippets.

@Andrewpk
Andrewpk / OSX-junos_pulse_listenToMe.sh
Last active July 11, 2024 20:22
wtf juniper.Anyone else find it irritating that junos pulse services and pulse tray must always running in OS X regardless of whether or not you're currently connected?Yeah, me too.I added the following as aliases to my shell to fix this problem.Be sure to change your /Library/LaunchAgents/net.juniper.pulsetray.plist file to reflect the `KeepAli…
#################################################################################
# start and stop the vpn from the command line from now on with these two commands
#################################################################################
startvpn() {
sudo launchctl load -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist
launchctl load -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist
}
quitvpn() {
launchctl unload -w /Library/LaunchAgents/net.pulsesecure.pulsetray.plist
sudo launchctl unload -w /Library/LaunchDaemons/net.pulsesecure.AccessService.plist
@psebborn
psebborn / countCSSRules.js
Last active April 25, 2023 11:43
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {