Skip to content

Instantly share code, notes, and snippets.

View notverypc's full-sized avatar
🍰
Cake or Death?

notverypc notverypc

🍰
Cake or Death?
View GitHub Profile
@notverypc
notverypc / remove_item.sh
Created June 8, 2020 14:50
Remove Item from SelfServeManifest
!/bin/bash
# See if item is in SelfServeManifest
itemToRemove="R"
ssm_items=$(/usr/libexec/PlistBuddy -c "Print managed_installs" /Library/Managed\ Installs/manifests/SelfServeManifest | /usr/bin/grep -n -w $itemToRemove | /usr/bin/awk -F ":" '{print $1}')
if [ ! -z "$ssm_items" ]; then
# Item to delete is the number minus two
itemToDelete=$(($ssm_items-2))
@notverypc
notverypc / mwa2_AD_auth.py
Created June 25, 2018 14:29
MWA2 Active Directory Auth
# django ldap auth
USE_LDAP = True
# LDAP authentication support
if USE_LDAP:
import ldap
from django_auth_ldap.config import LDAPSearch, LDAPGroupQuery, ActiveDirectoryGroupType
# LDAP settings
AUTH_LDAP_SERVER_URI = 'ldap://something.ac.uk:389'
@notverypc
notverypc / FirstTrafficAlerts.py
Created February 22, 2016 20:28
FirstTrafficAlerts
#!/usr/bin/python
import feedparser
# Function to fetch the rss feed and return the parsed RSS
def parseRSS( rss_url ):
return feedparser.parse( rss_url )
# Function grabs the rss feed headlines (titles) and returns them as a list
def getHeadlines( rss_url ):
headlines = []
It is also funny about it’s nginx config as well
grahamgilbert [11:09 AM]
in case anyone goes mad over the mysterious ‘Error -1001’, putting `add_header Accept-Ranges bytes;` into your nginx config sorts everything out
@notverypc
notverypc / resetairplay
Created May 26, 2015 14:36
AirPlay Audio
sudo killall coreaudiod
@notverypc
notverypc / Make2
Created May 22, 2015 13:59
updatedMakeFile
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
PACKAGE_VERSION=1.0.2
TITLE=DockSettingsPKG
REVERSE_DOMAIN=com.notverypc.Change_Sidebar_List
PAYLOAD=\
pack-GenericDock.sh
pack-GenericDock.sh: l_usr_local
@sudo mkdir -p ${WORK_D}/usr/local/outset/login-once
@notverypc
notverypc / makefile
Created May 22, 2015 12:19
makefile_error
USE_PKGBUILD=1
include /usr/local/share/luggage/luggage.make
PACKAGE_VERSION=1.0.2
TITLE=DockSettingsPKG
REVERSE_DOMAIN=com.notverypc.Change_Sidebar_List
PAYLOAD=\
pack-GenericDock.sh
pack-GenericDock.sh: l_usr_local_outset
@sudo ${CP} ./GenericDock.sh ${WORK_D}/usr/local/outset/login-once/GenericDock.sh
@notverypc
notverypc / output
Created May 12, 2015 12:04
pkgutil --pkgs=.\+acrobat\.DC.\+
com.adobe.acrobat.DC.viewer.app.pkg.MUI
com.adobe.acrobat.DC.viewer.appsupport.pkg.MUI
com.adobe.acrobat.DC.viewer.browser.pkg.MUI
com.adobe.acrobat.DC.viewer.print_automator.pkg.MUI
com.adobe.acrobat.DC.viewer.print_pdf_services.pkg.MUI
@notverypc
notverypc / dockertext
Created March 27, 2015 13:15
InstallDockertext
Install Ubuntu
options - OpenSSH
- Virtual Hosts.
Ran updates & installed
Installed VMWare Tools
Ran updates & installed
--- SnapShot taken
Intsalled Docker
Checked docker is working with Hello WOrld.
@notverypc
notverypc / printer
Created March 26, 2015 19:13
DeployPrinter
#!/bin/sh
# (c) 2010 Walter Meyer SUNY Purchase College
# Script to install and setup printers on a Mac OS X system in a "Munki-Friendly" way.
# Make sure to install the required drivers first!
# Variables. Edit these.
printername="MFD_Colour"
location="MFD Colour"