I thought I'd try self-hosting for a while.

Love Begins

Kaledo Art
dirt enthusiast
"I'm Dorothy Gale from Kansas"
cherry valley forever
h

Andulka
🪼

titsay
styofa doing anything
PUT YOUR BEARD IN MY MOUTH

izzy's playlists!

No title available

★
Show & Tell
wallacepolsom
taylor price
hello vonnie
Lint Roller? I Barely Know Her
Stranger Things
seen from India
seen from Bulgaria
seen from Germany

seen from Brazil
seen from Philippines
seen from Malaysia
seen from Netherlands

seen from Malaysia
seen from Jordan

seen from Belgium
seen from United States

seen from Singapore

seen from Malaysia

seen from Germany

seen from United States
seen from United States
seen from United States

seen from United States

seen from Poland

seen from United States
@bennettp123
I thought I'd try self-hosting for a while.
O Fortuna Misheard Lyrics (Animated) (by FamishedMammal)
Booting iMac12,1 from ISC-DHCP
I recently stumbled across this excellent article by Pepijn Oomen, who describes how to get a netboot image to show up in the ⌥‑boot menu of the MacMini3,1.
This method worked great for my 2011 iMac12,1 until I updated the firmware. I could still boot the image, but it would not appear in the boot menu.
However, I was able to get it working by modifying the BSDP packet. Pepijn’s configuration has the following characteristics:
When the Mac requests the image list, the DHCP server returns the list of images available on the server. In Pepijn’s case, one image is listed, with id “1” and name “netboot”:
option vendor-encapsulated-options 01:01:01: # bsdp_msgtype_list 09:0c:81:00:00:01:07:6e:65:74:62:6f:6f:74; # netboot
Otherwise, it returns the select boot image (index 1):
option vendor-encapsulated-options 01:01:02: # bsdp_msgtype_select 08:04:81:00:00:01; # bsdptag_selected_boot_image
This worked fine with the new firmware when the Mac was booted holding ‘N’, but to get it to appear in the ⌥‑boot menu, I had to make the following modifications:
I modified the bsdp_msgtype_list so the id and name matched my image, and I added the server priority (BSDP option 2) and default image (BSDP option 7):
# bsdp image list message: # one image, plus one default image (both are the same) option vendor-encapsulated-options 01:01:01: # bsdp_msgtype_list 04:02: # bsdp option code 4 (length 02) server priority 80:00: # Priority (32768) 07:04: # bsdp option code 7 (length 04) default image id 81:00:00:89: # Image ID (137) 09:0e: # bsdp option code 9 (length 0e) image list 81:00:00:89: # Image ID (137) 09:44:6f:45:2d:49:6d:61:67:65; # Name (length 09) 'DoE-Image'
I added the machine name to the bsdp_msgtype_select reply (and modified the index to match the change above).
# details about the selected image # option vendor-encapsulated-options 01:01:02: # bsdp_msgtype_select 08:04: # bsdptag_selected_boot_image 81:00:00:89: # Image ID (137) 82:09: # Machine Name (length 09) 44:6f:45:2d:49:6d:61:67:65; # 'DoE-Image'
… voilà! The image appears in the boot menu.
The following pages were extremely helpful when figuring out how to modify the bsdp packets:
http://www.afp548.com/netboot/mactips/bootpd.html
http://opensource.apple.com/source/bootp/bootp-237.3/Documentation/BSDP.doc
Finally, I have included the entire dhcpd.conf below. It also includes a (commented) message list which contains multiple images. The two images appear separately in the boot menu, but I can’t figure out an easy way to differentiate between them during bsdp_msgtype_select.
# # Apple BSDP server. Does NOT give out IP addresses # ddns-update-style none; ddns-updates off; ignore client-updates; allow booting; authoritative; boot-unknown-clients on; ping-check off; one-lease-per-client on; default-lease-time 7200; max-lease-time 7200; allow-unknown-clients; subnet 0.0.0.0 netmask 0.0.0.0 { pool { # DON'T supply an IP address! range 0.0.0.0 0.0.0.0; allow members of "netboot"; } } class "netboot" { match if substring (option vendor-class-identifier, 0, 9) = "AAPLBSDPC"; option dhcp-parameter-request-list 1,3,17,43,60; if (option dhcp-message-type = 1) { option vendor-class-identifier "AAPLBSDPC"; option vendor-encapsulated-options 08:04:81:00:00:89; # bsdp option 8 (length 04) -- selected image id; } elsif (option dhcp-message-type = 8) { option vendor-class-identifier "AAPLBSDPC"; if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01) { log(debug, "bsdp_msgtype_list"); # bsdp image list message: # one image, plus one default image (both are the same) option vendor-encapsulated-options 01:01:01: # bsdp_msgtype_list 04:02: # bsdp option code 4 (length 02) server priority 80:00: # Priority (32768) 07:04: # bsdp option code 7 (length 04) default image id 81:00:00:89: # Image ID (137) 09:0e: # bsdp option code 9 (length 0e) image list 81:00:00:89: # Image ID (137) 09:44:6f:45:2d:49:6d:61:67:65; # Name (length 09) 'DoE-Image' # bsdp image list message: # TWO images, plus one default image (both are the same) #option vendor-encapsulated-options # 01:01:01: # bsdp_msgtype_list # 04:02: # bsdp option code 4 (length 02) -- server priority # 80:00: # Priority (32768) # 07:04: # bsdp option code 7 (length 04) -- default image id # 81:00:00:89: # Image ID (137) # 09:1b: # bsdp option code 9 (length 1b) -- image list # 81:00:00:89: # Image ID (137) # 09:44:6f:45:2d:49:6d:61:67:65: # Name (length 09) 'DoE-Image' # 81:00:04:31: # Image ID (1073) # 08:44:53:52:2d:31:30:37:33; # Name (length 08) 'DSR-1073' # option-boot lists both images, but } else { log(debug, "bspd_msgtype_select"); # details about the selected image # option vendor-encapsulated-options 01:01:02: # bsdp_msgtype_select 08:04: # bsdptag_selected_boot_image 81:00:00:89: # Image ID (137) 82:09: # Machine Name (length 09) 44:6f:45:2d:49:6d:61:67:65; # 'DoE-Image' if (substring(option vendor-class-identifier, 10, 4) = "i386") { filename "/osx/i386/booter"; next-server 10.25.64.32; option root-path = "http://10.25.64.32/build.sparseimage"; } elsif (substring(option vendor-class-identifier, 10, 3) = "ppc") { filename "nil"; } } } }
How to create a user account in lion from single user mode
Here's how:
Boot into single user mode (⌘S), and run the following commands:
# Mount the filesystem; start opendirectoryd: /sbin/fsck -fy && /sbin/mount -uw / launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist # Create the user account: dscl . -create /Users/localadmin dscl . -create /Users/localadmin UserShell /bin/bash dscl . -create /Users/localadmin RealName "Local Admin" dscl . -create /Users/localadmin UniqueID 502 dscl . -create /Users/localadmin PrimaryGroupID 20 dscl . -create /Users/localadmin NFSHomeDirectory /Users/localadmin # Create the home directory: cp -R "/System/Library/User Template/English.lproj" /Users/localadmin chown -R localadmin:staff /Users/localadmin # Set the password: dscl . -passwd /Users/localadmin newPassword # Grant admin access (optional): dscl . -append /Groups/admin GroupMembership localadmin
Notes:
Ignore any error messages which look like this:
launchctl: Couldn't stat("/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist"): No such file or directory nothing found to load
To get the next unused UniqueID, run this command:
maxid=$(dscl . -list /Users UniqueID | awk '{print $2}' | sort -ug | tail -1) newid=$((maxid+1)) echo $newid
To get the group id for the staff group, run this command:
dscacheutil -q group -a name staff
(make a note of the uid -- usually 20)
Sources: http://support.apple.com/kb/HT4749 http://serverfault.com/questions/20702/how-do-i-create-user-accounts-from-the-terminal-in-mac-os-x-10-5
I've seen my share of EAV database designs.
They work great with something like NoSQL or Apple PLIST files, but there is nothing worse than trying to maintain an in-house EAV data model which has been shoe-horned into a regular SQL database.
Nice tutorial.
I wrote a [SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/) plugin for ini, inf, and reg files. See it in action [here](http://www.bennettp.id.au/post/11686569563/injecting-ahci-drivers-into-a-live-windows-xp-system). Link:
building cntlm from subversion using macports
I recently submitted a bug report to cntlm, who fixed the problem in SVN.
New problem: building it in macports from subversion. (Why do it the easy way?)
(Update: when run as a system service on Lion, it crashes. I suspect this is due to sandboxing in Lion, because it works fine as long as you don't let it open its conf file).
Instructions
Install and configure macports. Note that selfupdate doesn't work from svn.
Create a local repository:
mkdir -p ~/ports/net/cntlm/files
Copy the Portfile and patch to the repository (contents below):
cp /path/to/Portfile ~/ports/net/cntlm cp /path/to/patch-trunk-Makefile.diff ~/ports/net/cntlm/files
Configure the local repository. Add the following line to /opt/local/etc/macports/sources.conf, then sync the repository:
file:///Users/localadmin/ports
sudo port -d sync
Install cntlm:
sudo port -v install cntlm
Portfile
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name cntlm version HEAD license gpl categories net platforms darwin maintainers xs4all.nl:hbruinsma homepage http://cntlm.sourceforge.net/ description Cntlm is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy svn.url https://cntlm.svn.sourceforge.net/svnroot/cntlm/cntlm/trunk svn.revision HEAD fetch.type svn worksrcdir trunk patchfiles patch-trunk-Makefile.diff depends_lib port:coreutils build.target {} build.args SYSCONFDIR=/opt/local/etc BINDIR=/opt/local/sbin \ MANDIR=/opt/local/man destroot.args SYSCONFDIR=/opt/local/etc BINDIR=/opt/local/sbin \ MANDIR=/opt/local/man startupitem.create yes startupitem.name cntlm startupitem.executable "${prefix}/sbin/cntlm"
patch-trunk-Makefile.diff
-- Makefile 2011-10-14 19:45:26.000000000 +0800 +++ Makefile.old 2011-12-06 17:11:08.000000000 +0800 @@ -44,10 +44,10 @@ install -M 644 -f $(MANDIR)/man1 doc/$(NAME).1; \ install -M 600 -c $(SYSCONFDIR) doc/$(NAME).conf; \ else \ - install -D -m 755 -s $(NAME) $(BINDIR)/$(NAME); \ - install -D -m 644 doc/$(NAME).1 $(MANDIR)/man1/$(NAME).1; \ + install -m 755 -s $(NAME) $(BINDIR)/$(NAME); \ + install -m 644 doc/$(NAME).1 $(MANDIR)/man1/$(NAME).1; \ [ -f $(SYSCONFDIR)/$(NAME).conf -o -z "$(SYSCONFDIR)" ] \ - || install -D -m 600 doc/$(NAME).conf $(SYSCONFDIR)/$(NAME).conf; \ + || install -m 600 doc/$(NAME).conf $(SYSCONFDIR)/$(NAME).conf; \ fi @echo; echo "Cntlm will look for configuration in $(SYSCONFDIR)/$(NAME).conf"
Note that macports does not recommend building from subversion, since the results will not be reproducible. However, for testing, it should work fine.
Mucking around on iPad; kind of an ambient vibe.
(Link)
More Greasemonkey scripting
More work-related scripting.
// ==UserScript== // @name CI Manager Fixes // @namespace http://bennettp.id.au // @description Fixes some of the broken CSS in CI Manager. Very much a work in progress. // @include http://cimanager.REDACTED/* // ==/UserScript== function addCSS(cssString) { var head = document.getElementsByTagName('head')[0]; if (!head) { return null; } var newCSS = document.createElement('style'); newCSS.type = "text/css"; newCSS.innerHTML = cssString; head.appendChild(newCSS); } // delete an element by ID and return its parent function removeByID(elementId) { var element = document.getElementById(elementId); if (!element) { return null; } var parent = element.parentNode; parent.removeChild(element); return parent; } // delete the stupid placeholder image, replace it with some regular text var imageID = "ctl00_MainContent_ctl00_imgNoRelationData" try { // (removeByID returns the parent of the element removed.) removeByID(imageID).innerHTML = "No relationship data available"; } catch (error) { // who cares? } // add an empty placeholder to the end of the menu // **** EDIT: doesn't work properly with floats; disabled **** // var menu = document.getElementById("menu"); // if (menu) { // var placeholder = document.createElement('div'); // placeholder.id = "menu_placeholder"; // placeholder.innerHTML = " "; // menu.appendChild(placeholder); // } // add some custom CSS addCSS ( ' div#page { overflow:auto!important } \n\ div#main { float:none!important; \n\ background-image:none!important; \n\ width:auto!important; } \n\ div#menu { margin-right:25px!important } \n\ //div#menu_placeholder { height:1000px } \n\ //td { width:auto!important } \n\ //select,textarea,input { width:auto!important } \n\ \n\ #ctl00_MainContent_ctl00_txtNotes, \n\ #ctl00_MainContent_ctl00_txtSiteName, \n\ #ctl00_MainContent_ctl00_lstRelations, \n\ #ctl00_MainContent_ctl00_pnlNoRelationData \n\ { width:auto!important } \n\ \n\ #ctl00_MainContent_ctl00_lstRelations { min-width:140px } \n\ \n\ #ctl00_MainContent_ctl00_ddlStatus, \n\ #ctl00_MainContent_ctl00_ddlClassification \n\ { width:146px!important } \n\ \n\ #ctl00_MainContent_ctl00_txtCreationDate, \n\ #ctl00_MainContent_ctl00_txtModifiedDate \n\ { width:138px!important } \n\ \n\ #ctl00_MainContent_ctl00_chkAdditionalServices, \n\ #ctl00_MainContent_ctl00_chkCAPUTemplates \n\ { text-align:right } \n\ \n\ label + input { white-space:nowrap } \n\ \n\ //table * * div { width:auto!important } \n\ \n\ #ctl00_MainContent_pnlInitialView>table, \n\ #ctl00_MainContent_pnlInitialView>table>tbody, \n\ { width:58%!important } \n\ \n\ #ctl00_MainContent_pnlInitialView>table * td \n\ { width:auto!important } \n\ \n\ #ctl00_MainContent_pnlInitialView>table * td>div \n\ { overflow:hidden!important; \n\ text-overflow:ellipsis!important; \n\ white-space:nowrap!important; \n\ } \n\ #ctl00_MainContent_pnlInitialView>table * td h5, \n\ #ctl00_MainContent_pnlInitialView>table * td div \n\ { width:68%!important; } \n\ \n\ #ctl00_MainContent_pnlInitialView>table * td>hr \n\ { visibility:hidden; } \n\ \n\ //#ctl00_MainContent_pnlInitialView>table>tbody, \n\ //#ctl00_MainContent_pnlInitialView>table>tr \n\ //{ width:78%!important ); \n\ ' );
Adobe discontinues mobile Flash plugin.
I expected to find something that didn’t work, but as the days turned into weeks and the weeks gathered into a month, I found I hadn’t returned to my laptop even once.
http://yieldthought.com/post/12239282034/swapped-my-macbook-for-an-ipad
Developer swaps MacBook for iPad + VPS for a month.
THIS IS THE MOST AWESOME THING I HAVE EVER SEEN!
Apple Lossless Codec is now open source. That was unexpected.
This song is awesome.
(Also this and this).
Can't find the "Show Desktop" button in Windows 7?
Solution here.
Spoiler: