This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://swcdn.apple.com/content/downloads/21/49/091-7363/o9veiecea89qkdmk94met1af4wu2fuwn2j/JavaForOSX.pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)writeFormatString:(NSString*)format, ... | |
{ | |
if(format){ | |
va_list args; | |
va_start(args, format); | |
NSString *str = [[NSString alloc] initWithFormat:format arguments:args]; | |
va_end(args); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib2 | |
def github_latest_release(user,repo): | |
SUPPORTED_TYPES=['dmg','zip','gz'] | |
DEST=str(u'https://api.github.com/repos/%s/%s/releases' % (user,repo)) | |
data = json.load(urllib2.urlopen(DEST)) | |
try: | |
latest_release = data[0]['assets'][0]['browser_download_url'] | |
for t in SUPPORTED_TYPES: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(\d+)\.(\d+)(\.(\d+))?(\.(\d+))?(?:(?:-(alpha\d*|beta\d*|rc\d*))?) | |
Will detect these formats | |
1.21.23 | |
1.21.23-rc | |
1.21.23-rc1 | |
2.21.23-alpha | |
1.211.233-beta12 | |
3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/python | |
''' if you don't have the requests module installed you'll need to do that | |
with either pip or easy_install''' | |
import os,requests | |
''' Setup server and auth data. This is the name of your JSS, | |
NOT the webdav share of the JDS. The JSS actually distributes the | |
data you upload to it across the JDS shares. | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <NetFS/NetFS.h> | |
///....//// | |
- (void)mount:(NSURL *)networkShare user:(NSString *)user password:(NSString *)password | |
{ | |
NSURL *mountPath = [NSURL URLWithString:@"/Volumes/"]; | |
dispatch_queue_t myQueue = dispatch_get_main_queue(); | |
AsyncRequestID requestID = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import urllib | |
import subprocess, os | |
''' Set these ''' | |
user = "your_username" | |
password = "your_password" | |
server = "your.server.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSTextField+controlTextDidPause.h | |
// | |
// Created by Eldon Ahrold on 5/23/15. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite3 -csv munkiwebadmin.db "SELECT * FROM reports_machine;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
''' | |
Pass in the Full path to the application as the first arg | |
for example /usr/local/sbin/rm_global_login.py /Applicaitons/MunkiMenu.app | |
''' | |
import os | |
import sys | |
from LaunchServices import * |
OlderNewer