Skip to content

Instantly share code, notes, and snippets.

@idnovic
idnovic / shellfishwidget.sh
Last active July 16, 2023 23:03
shellfish widget
#!/bin/bash
source .bashrc
loadavg=$(cat /proc/loadavg | awk '{print $2}' | sed 's/[^0-9]*//g')
cpucount=$(sed -n '/ cores/ s/[^0-9]//gp' /proc/cpuinfo | sed '1,1d')
cpu=$(($loadavg/$cpucount))
memtotal=$(sed -n '/^MemTotal:/ s/[^0-9]//gp' /proc/meminfo)
memavail=$(sed -n '/^MemAvailable:/ s/[^0-9]//gp' /proc/meminfo)
mem=$(((($memtotal-$memavail))/($memtotal/100)))
@wisnukurniawan
wisnukurniawan / PDF
Last active October 2, 2024 10:44 — forked from nevan/wwdc_2016_videos.txt
WWDC 2016
http://devstreaming-cdn.apple.com/videos/wwdc/2016/102w0bsn0ge83qfv7za/102/102_platforms_state_of_the_union.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/201h1g4asm31ti2l9n1/201/201_internationalization_best_practices.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/202w2zhc4l8yomptqnt/202/202_whats_new_in_accessibility.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/203x2w42att1kdzg1ce/203/203_whats_new_in_cocoa.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/204t23fvanrkj7a1oj7/204/204_imessage_apps_and_stickers_part_1.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/205n2okotvilcayc8rc/205/205_whats_new_in_cocoa_touch.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/206a38wgme6uponcuwd/206/206_whats_new_in_tvos.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/207i37356qcyyh2yxos/207/207_whats_new_in_foundation_for_swift.pdf
http://devstreaming-cdn.apple.com/videos/wwdc/2016/208j30f4v1a1i9i5fg9/208/208_whats_new_in_watchos_3.pdf
http://devstreaming-cdn.apple.co
class Logging(object):
__name__ = 'logger.info(1)'
plist = '/System/Library/Preferences/Logging/Subsystems/'
def __init__(__name__, plist, *args, **kwargs):
super(getLogger/, self).__init__()
logger.info('Input parameters:\n'
'accessibility: "{com.apple.Accessibility.plist}"\n'
@bruienne
bruienne / osx_parse_incompatible_apps.py
Last active September 30, 2022 13:09
Downloads and parses MigrationIncompatibleApplicationsList.plist for OS X versions 10.7-10.11
#!/usr/bin/python
# pylint: disable=fixme, line-too-long, missing-docstring, C0103
# Many parts of this were taken from Greg Neagle's COSXIP (https://github.com/munki/createOSXinstallPkg)
# No parsing of 'BannedRegexMatchVersion' keys currently because regex is hard.
#
# Output prints a list of incompatible apps for each major OS X version
# with its version and optional file listing of the target app.
import plistlib
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active October 8, 2024 19:54
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /