Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
# Python routines for parsing bom files | |
# | |
# Examples so far: | |
# | |
# dump_bom(filename) - prints diagnostic structure information about bom file (including path list) | |
from ctypes import BigEndianStructure, c_char, c_uint8, c_uint16, c_uint32, sizeof, memmove, addressof | |
class BOMHeader(BigEndianStructure): | |
_pack_ = 1 |
import sys | |
from ctypes import CDLL | |
JavaLaunching = CDLL('/System/Library/PrivateFrameworks/JavaLaunching.framework/JavaLaunching') | |
if (JavaLaunching.JLIsRuntimeInstalled() == 0): | |
print "Apple JRE is not installed." | |
sys.exit(1) | |
else: | |
print "Apple JRE is installed." | |
sys.exit(0) |
#!/usr/bin/python | |
import ctypes, ctypes.util | |
# Import CoreGraphics as a C library, so we can call some private functions | |
c_CoreGraphics = ctypes.CDLL(ctypes.util.find_library('CoreGraphics')) | |
def disable_beam_sync(doDisable): | |
if doDisable: | |
# Disabling beam sync: | |
# 1st: Enable Quartz debug |
// ================================ | |
// COPrinterPaperSizes.h | |
// ================================ | |
#import <Foundation/Foundation.h> | |
#define PAPER_NAME @"paper_name" | |
#define PAPER_SIZE @"paper_size" | |
@interface COPrinterPaperSizes: NSObject |
(* To the extent possible under law, Rob Mayoff has waived all copyright and related or neighboring rights to “AppleScript to make Google Chrome open/reload a URL”. This work is published from: United States. https://creativecommons.org/publicdomain/zero/1.0/ *) | |
tell application "Google Chrome" | |
activate | |
set theUrl to "http://tycho.usno.navy.mil/cgi-bin/timer.pl" | |
if (count every window) = 0 then | |
make new window | |
end if | |
set found to false |