Skip to content

Instantly share code, notes, and snippets.

@rtrouton
rtrouton / fixcaspermdm.sh
Created June 15, 2014 00:19
Script to remove and install the MDM certificate on a Casper 9.x-managed Mac running 10.7.x or later.
#!/bin/bash
#
# User-editable variables
#
# For the jss_server_address variable, put the complete
# fully qualified domain name address of your Casper server
jss_server_address="casper.server.here"
@sheagcraig
sheagcraig / bring_the_payne.py
Created May 4, 2017 14:05
Get IP Address for all computers in the JSS
#!/usr/bin/env python
"""https://twitter.com/krispayne/status/859833552078225408:
@shea_craig is possible with python-jss to generate a list of IP addresses for
computers in the JSS?
"""
from operator import itemgetter
#!/usr/local/bin/python3
"""
Custom inventory script for Ansible populated by the JSS
"""
from os.path import dirname, realpath, join
from urllib.parse import quote
import argparse
import json
import configparser
#!/usr/local/bin/python3
"""
Custom inventory script for Ansible populated by the JSS
"""
from functools import lru_cache
from os.path import dirname, realpath, join
from urllib.parse import quote
import argparse
import json
#!/usr/bin/python
import sys, os
import urllib, urllib2
import base64
import json
import requests
import xml.etree.ElementTree as ET
def requests_xml(jss_user, jss_pass, jss_url, category):
@devynspencer
devynspencer / freeipa.md
Created March 5, 2016 06:41
FreeIPA api notes
[devyn@ipa ~]$ ipa help commands
automember-add                         Add an automember rule.
automember-add-condition               Add conditions to an automember rule.
automember-default-group-remove        Remove default (fallback) group for all unmatched entries.
automember-default-group-set           Set default (fallback) group for all unmatched entries.
automember-default-group-show          Display information about the default (fallback) automember groups.
automember-del                         Delete an automember rule.
automember-find                        Search for automember rules.
automember-mod                         Modify an automember rule.
@Chrisedmo
Chrisedmo / latest-blog-posts.css
Created July 31, 2012 11:29
Shopify: Latest Blog Posts
.widget .latest-blog-posts-list {
margin: 0;
list-style: none;
}
.widget .latest-blog-posts-list li {
margin: 0 0 10px 0;
padding: 0 0 10px 0;
border-bottom: dotted 1px #CCC;
background: none;
word-wrap: break-word;
# Centos 7.1
yum -y install wget
wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
rpm -ivh nux-dextop-release-0-5.el7.nux.noarch.rpm
yum -y install deluge-web
systemctl start deluge-web
systemctl stop firewalld
#!/usr/bin/python
# As written, this requires the following:
# - OS X 10.6+ (may not work in 10.10, haven't tested)
# - python 2.6 or 2.7 (for collections.namedtuple usage, should be fine as default python in 10.6 is 2.6)
# - pyObjC (as such, recommended to be used with native OS X python install)
# Only tested and confirmed to work against 10.9.5
# Run with root
@bzerangue
bzerangue / macs-on-active-directory.md
Last active October 12, 2023 21:07
Binding and Unbinding to Active Directory from Mac OS via Command Line

Binding and Unbinding to Active Directory from Mac OS via Command Line

  • Open the Terminal Application
  • Type in sudo -i and type in your Mac Administrator account password. sudo gives you root level or administrator level privileges.

To View current Active Directory Settings

dsconfigad -show

To Unbind a Computer from an Active Directory Domain