Skip to content

Instantly share code, notes, and snippets.

View jamesez's full-sized avatar

Jim Zajkowski jamesez

View GitHub Profile
@jamesez
jamesez / Makefile
Created November 17, 2021 16:32
AnyConnect Mac package respinner
# put AnyConnect.pkg next to this Makefile
# make a directory "profiles" and put any profiles you want to embed in it
# run `make` to get a package
#
# if you want to codesign this you will need a DevID and set up altool's password,
# otherwise strip out the --sign argument to productbuild and remove the xcrun altool block, here
CorpVPN.pkg: tmp/Distribution tmp/vpn.pkg tmp/profiles.pkg
productbuild \
--sign 'Developer ID Installer: Org Name (ORGCODE)' \
@jamesez
jamesez / nginx.conf
Created May 24, 2016 21:39
munki caching server config
daemon off; # docker requirement
worker_processes 6;
pid /tmp/nginx.pid;
user nginx;
events {
worker_connections 768;
}
http {
- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
self.windows = [NSMutableArray new];
#ifndef DEBUG
for (NSScreen *screen in [NSScreen screens]) {
NSWindow *blockingWindow = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, [screen frame].size.width, [screen frame].size.height)
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
@jamesez
jamesez / Xcode-4.5.2-CommandLineTools-10.7.plist
Created January 29, 2013 18:24
Xcode 4.5.2 series munki pkginfos
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>autoremove</key>
<false/>
<key>catalogs</key>
<array>
<string>free</string>
</array>
echo IzzyBoot for Fusion Drives
echo Version 1.0
echo
# Are we already encrypted?
if diskutil cs list | grep "Encrypted Extents" | grep -q "Yes"; then
echo It appears as though this drive is using FileVault2 encryption. This tool is too
echo simple to figure out what to do, but maybe you can use Disk Utility to repartition
echo the drive or remove the encryption first.
echo
@jamesez
jamesez / gist:3085058
Created July 10, 2012 17:47
Build Chrome dmg
#!/bin/bash -ex
# Mount disk image on temp space
mountpoint=`hdiutil attach -mountrandom /tmp -nobrowse googlechrome.dmg | awk '/private\/tmp/ { print $3 } '`
echo Mounted on $mountpoint
# Determine version number
version=`defaults read "$mountpoint/Google Chrome.app/Contents/Info.plist" CFBundleShortVersionString`
echo Google Chrome version $version
@jamesez
jamesez / build.sh
Created July 3, 2012 13:31
Adobe AIR Munki Packaging
#!/bin/bash -ex
# download latest Adobe AIR
ftp -o adobeair.dmg http://airdownload.adobe.com/air/mac/download/latest/AdobeAIR.dmg
# Mount disk image on temp space
mountpoint=`hdiutil attach -mountrandom /tmp -nobrowse adobeair.dmg | awk '/private\/tmp/ { print $3 } '`
echo Mounted on $mountpoint
# Obtain version
@jamesez
jamesez / .bashrc.sh
Created April 5, 2010 21:42 — forked from yannk/.bashrc.sh
She'll make point five past lightspeed. She may not look like much, but she's got it where it counts, kid. I've made a lot of special modifications myself.
# add in your .bashrc
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# http://blog.cyberion.net/2009/01/improved-bash-prompt-for-git-usage.html
#
# I've made the following ajustements:
# - Use of plumbing, that should be faster than git status porcelain.
# - Don't show my repo as dirty if it has files unknown from the index (I always have).
# - Integrated to debian's PS1 (trivial to adapt) and uses standard __git_ps1 from bash_completion
@jamesez
jamesez / sorter.rb
Created July 20, 2009 15:23
Sort tapes. This is dumb.
#!/usr/bin/env ruby
require 'pp'
current_slots = Hash.new
current_index = Array.new
temp_slot = 281
File.open("tapes-in-slots.txt") do |file|
@jamesez
jamesez / Convert from TWiki to Confluence markup.rb
Created July 20, 2009 15:20
Convert TWiki markup format to Confluence markup, for some kind of import thing.
# I copied this from somewhere, I wish I knew where.
def convert_from_twiki_to_confluence(old_page_text)
new_page_text = ""
# shifting the tables over
while (true)
if (old_page_text.index(/\n\|/).nil?)
new_page_text += old_page_text
break