Skip to content

Instantly share code, notes, and snippets.

@JDHatman
JDHatman / ifw_query
Created December 5, 2018 18:15
ifw_query
select concat(phonenumber.name, ' ', processed.calldatetime) as NewID, processed.phonenumber, processed.calldatetime, processed.originalcalledpartynumber, processed.secondextension, processed.callingpartynumber, phonenumber.name, count(case processed.originalcalledpartynumber when '8271' then 1 else null end) over (partition by phonenumber.name) as total, case when processed.smdrtype = 'A' then 'True' else 'False' end as Abandoned from processed
right join phonenumber on processed.phonenumber = RIGHT(phonenumber.phonenumber, LEN(phonenumber.phonenumber) - 1)
where convert(date, calldatetime) = convert(date, getdate()) and originalcalledpartynumber = '8271'
UNION
select concat(phonenumber.name, ' ', processed.calldatetime) as NewID, processed.phonenumber, processed.calldatetime as CallDate, processed.originalcalledpartynumber, processed.secondextension, processed.callingpartynumber, phonenumber.name, count(case processed.originalcalledpartynumber when '8271' then 1 else null end) over (partition by phonenumber
@JDHatman
JDHatman / Sysadminctl admin account
Created October 8, 2018 01:46
Sysadminctl admin account
#!/bin/bash
# Create the Account
sysadminctl -addUser secretadmin -fullName SecretAdministrator -UID 510 -password secretpassword -admin -secureTokenOn -adminUser existingadminuser -adminPassword existingadminpassword
exit 0
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "postinstall" 7L, 199C
@JDHatman
JDHatman / munki_startosinstall
Created November 8, 2017 22:25
munki_startosinstall
Nov 8 14:10:44 jhat-tst101901 osishelperd[427]: Privilaged helper tool loaded.
Nov 8 14:10:44 jhat-tst101901 osishelperd[427]: WARN: using mkdir instead of rootless_mkdir_nounlink because the platform does not support it.
Nov 8 14:10:44 jhat-tst101901 osinstallersetupd[406]: Using product PKSecureNetEnabledProduct <file:///macOS%20Install%20Data/> at distance 5
Nov 8 14:10:44 jhat-tst101901 osinstallersetupd[406]: Using product <OSISSoftwareUpdateCatalogProduct: 0x7fcd82a5b5f0> at distance 25
Nov 8 14:10:44 jhat-tst101901 osinstallersetupd[406]: OSISDownloadOperation: totalEstimate=382.000000, significantDownload=1
Nov 8 14:10:44 jhat-tst101901 osinstallersetupd[406]: Retrieving 3 packages (5.015 GB)
Nov 8 14:10:45 jhat-tst101901 osinstallersetupd[406]: Retrieved package com.apple.pkg.CompatibilityUpdate (http://swcdn.apple.com/content/downloads/17/04/031-83163/n8thccuwnoqetn1kyn53bheb4nb7pw3wbv/OSX_10_12_IncompatibleAppList.pkg)
Nov 8 14:10:45 jhat-tst101901 osinstallersetupd[406]: No native mechanis
@JDHatman
JDHatman / sal error 2.3.0_2
Created November 3, 2015 18:10
sal error 2.3.0_2
(sal_env)[saluser@HQPLNX17 sal]$ python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: sal, staticfiles, admindocs, messages, api, bootstrap3
Apply all migrations: watson, sessions, admin, sites, auth, server, contenttypes, inventory, licenses
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
@JDHatman
JDHatman / sal error 2.3.0
Created November 3, 2015 16:12
sal error 2.3.0
(sal_env)[saluser@HQPLNX17 sal]$ python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: sal, staticfiles, admindocs, messages, api, bootstrap3
Apply all migrations: watson, sessions, admin, sites, auth, server, contenttypes, inventory, licenses
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
@JDHatman
JDHatman / sal 2.2.3 syncdb
Created October 26, 2015 15:32
sal 2.2.3 syncdb
(sal_env)[saluser@HQPLNX17 sal]$ python manage.py syncdb
Operations to perform:
Synchronize unmigrated apps: sal, staticfiles, admindocs, messages, api, bootstrap3
Apply all migrations: watson, sessions, admin, sites, auth, server, contenttypes, inventory, licenses
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
@JDHatman
JDHatman / sal migrate error
Created September 4, 2015 15:28
sal migrate error
(sal_env)[saluser@HQPLNX17 sal]$ python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: sal, staticfiles, admindocs, messages, api, bootstrap3
Apply all migrations: sessions, admin, sites, auth, server, contenttypes, inventory
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
@JDHatman
JDHatman / sal post_url error
Last active August 31, 2015 17:52
sal post_url error
Not using osquery
Sal report submmitted for hq1123334
.
2015-08-31 12:51:55.570 Python[21026:436010]
<!DOCTYPE html>
<html lang="en">
<head>
@JDHatman
JDHatman / jetty.ini
Created August 19, 2015 16:19
jetty.ini
[jetty]
# IP address or hostname to listen for clear-text HTTP. To avoid resolution
# issues, IP addresses are recommended over hostnames.
# Default is `localhost`.
# host = <host>
host = puppetdbtest.fruit.com
# Port to listen on for clear-text HTTP.
port = 8080
@JDHatman
JDHatman / cck2 cfg
Created August 13, 2015 16:47
cck2 ckf
// Autoconfig file written by CCK2
var config = {
"cckVersion": "2.1.1",
"name": "fotldefault9",
"description": "Configures Firefox to Fruit of the Loom standards",
"version": "2015.0813.1",
"homePage": "http://news.fruit.com",
"titlemodifier": "Mozilla Firefox: Fruit of the Loom edition",
"extension": {