May 112017
 

Part 2 of installing Solus Linux on a 2012 Macbook Pro.

Part 1- simply booting the liveCD to even allow installation is here:
https://stephen.yearl.us/installing-solus-linux-on-a-macbook-pro-9

Rebooting after install lead to, you guessed it, the Black Screen of Death again. Solus was installed, accepting all defaults (and therefore one humongous / paritiion), to /dev/sdb2, /dev/sda1 is the EFI partition on which rEFInd was installed when running OSX MacOS.

❯ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdb      8:16   0   477G  0 disk
├─sdb2   8:18   0 473.2G  0 part /
└─sdb1   8:17   0   3.7G  0 part [SWAP]
sdc      8:32   1   3.9G  0 disk
sda      8:0    0 465.8G  0 disk
├─sda2   8:2    0   465G  0 part
├─sda3   8:3    0 619.9M  0 part
└─sda1   8:1    0   200M  0 part

#1 boot back into MacOS, mount EFI paritition:

sudo /Users/yearluk/Downloads/refind-bin-0.10.7/mountesp
❯  cd /Volumes/ESP/loader/entries
nano Solus-lts-4.9.22-17.conf

#2 CHANGE:

title Solus 2017.04.18.0
linux /EFI/com.solus-project/kernel-com.solus-project.lts.4.9.22-17
initrd /EFI/com.solus-project/initrd-com.solus-project.lts.4.9.22-17
options root=PARTUUID=c96bc351-b364-4c61-9fe6-8489f0ceec8f quiet ro splash resume=UUID=8f7d1509-fe95-4e47-8017-41611ad0a14c

TO:

title Solus 2017.04.18.0
linux /EFI/com.solus-project/kernel-com.solus-project.lts.4.9.22-17
initrd /EFI/com.solus-project/initrd-com.solus-project.lts.4.9.22-17
options root=PARTUUID=c96bc351-b364-4c61-9fe6-8489f0ceec8f ro nomodeset nouveau.blacklist=1  resume=UUID=8f7d1509-fe95-4e47-8017-41611ad0a14c text 3

#3 Repeat steps #3 through #8 from Part 1 (#7 this time was modprobe nvidia)

#4 update entire system

sudo eopkg up

#5 using the Apple bootloader [hold opt key whilst booting] to boot… boots graphically now.

May 082017
 

I’ve been sunning* Solus as guest in a Parallels virtual machine on a macOS Sierra 10.12.4 host for a couple of months now, and I am delighted and impressed, so impressed I bought the company** wanted to install this on Apple iron. Solus installed beautifully on an 2010 Lenovo X201 and on a new and cheap and plastically Dell Inspiron 14-3452, so it should have no probs installing on a mid-2012, 15.4″ Hi-Res MBP. Right? Right? Wrong!

[*] s/sunning/running/ but gonna let that stand because, as typos go, this is pretty funny
[**] Showing my age… thanks Victor Kiam!

So, minus the bits where I was as angry frustrated as a guy who met a stranger in the Alps [may not be SFW. Depends where you work.]:

————————–
EDIT: 2017-05-11
#001 Disable SIP (System Integrity Protection)
Reboot, holding CMD+R

❯ csrutil disable

Reboot

❯ csrutil status
System Integrity Protection status: disabled.

————————–

#01 Grab the 2017-04-18 ISO torrent from https://solus-project.com/download/
#02 Burn to a 16GB shiny-new USB thumdrive using etcher.
#03 Press opt (alt) key at boot, select the livecd image

and, Mr. Franklin, it balked. Black Screen of Death. If you do the googles this usually has something to do with graphics *and stuff*. Which, for me, means:

❯ system_profiler SPDisplaysDataType | grep -i chipset
      Chipset Model: Intel HD Graphics 4000
      Chipset Model: NVIDIA GeForce GT 650M

Boot at runlevel 3, wired connection and all that. Run the usual dmesg | less , journalctl | less, linux-driver-management status, modprobe and the googles. Poke and prod and pull hair, and finally…

—————

#1 Press opt (alt) key at boot, select the livecd image
#2 Immediately press ‘e’ and edit the kernel command line parameters (boot options), replacing “quiet splash” with “nomodeset nouveau.blacklist=1 3”. Full KMS now reads:

initrd root=live:CDLABEL=SolusLiveBudgie ro rd.luks=0 rd.md=0 nomodeset nouveau.blacklist=1 text 3

#3 Login prompt. User is “live”, there is no password
#4 Become root, password is “root”
#5 Unload nouveau (open source NVIDIA drivers)

# modprobe -r nouveau

#6 get more drivers from the Solus repository

# eopkg it nvidia-glx drivers

#7 load Intel (integrated) graphics

# modprobe i915

#8 Boot graphically

# /sbin/init 5

#9 Install and…
#10 sell as lakefront property
#11 PROFIT!

Apr 172017
 

Playing with Solus recently got me to thinking that maybe I could live again in a Linux world, but rather than running Linux in a Virtual Machine (that would currently be Parallels 12 for me), what if I dit it the other way around? That is, run OS X 10.12.4 (macOS Sierra) as a guest and Linux as a host…

Download MacOS Sierra from AppStore.

Reboot.

❯ hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
❯ hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
❯ hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
❯ asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmg
❯ hdiutil detach /Volumes/install_app
❯ hdiutil detach /Volumes/OS\ X\ Base\ System/
❯ hdiutil convert /tmp/Sierra.cdr.dmg -format UDTO -o /tmp/Sierra.iso
mv /tmp/Sierra.iso.cdr ~/Desktop/Sierra.iso

I grabbed this off the internets somewhere, and I do not know whence. Thanks to the original author, whoever she he may be.
EDIT [2017-05-08]: Found you: https://gist.github.com/arobb/447a962af4f07ef81e79987d686275e5

Mar 072017
 

tl;dr

I feel that after ten years I can no longer countenance the purchase of a new Apple laptop should my existing machine shit the bed. All that nonsense associated with the race to thinness and the resultant lack of expandability of the newer machines, where everything is soldered or glued into place, has me pretty upset. Oh, and the OS itself has been getting more annoying with each release since Snow Leopard. So I am planning for a day without OS X/ MacOS. After a few distro trials (ongoing) I’ve come down to:

Linux Mint 18.1

Solus OS

True OS

 With the thinking that Solus will be “The One”.

Problem: iPhone 5, iOS: 10.2.1 (14D27) will not mount under Solus OS.

iPhones, generally, used to mount fine prior to the iOS 10 release. The developers of

libimobiledevice

have rectified this, but many down stream distos have not quite caught up. Solution is to build oneself. Or wait. I didn’t want to wait…. in large part because Solus’s packaging system eopkg is completely rewritten and not based on AUR or apt-get I wanted to get to poke around it some more.

My hand-compiling of this is probably moot since Solus, being a rolling release, will eventually catch up. It probably will have by the time any reads this.

$ sudo eopkg it -c system.devel git
$ sudo eopkg it -c libtool pkg-config python-devel ibplist-devel libusb-devel fuse-devel

$ mkdir -p ~/usr/src
$ cd ~/usr/src

$ for x in libusbmuxd usbmuxd  ifuse; do git clone https://github.com/libimobiledevice/${x}.git;done

$ cd ~/usr/src/libusbmuxd
$ ./autogen.sh --prefix="$HOME/usr"
$ make && make install

$ cd ~/usr/src/libimobiledevice
$ ./autogen.sh --prefix="$HOME/usr"
$ make && make install

$ cd ~/usr/src/usbmuxd
$ ./autogen.sh --prefix="$HOME/usr"
$ make && sudo make install

$ cd ~/usr/src/ifuse
$ ./autogen.sh --prefix="$HOME/usr"
$ make && make install

$ mkdir -p ~/usr/mnt
$ ~idevice_id -l
$ ~/usr/bin/idevicepair pair

$ nautilus &
$ ls $ ls ~/usr/mnt/

All the real work was done by someone else (isn’t it always?), here: https://gist.github.com/samrocketman/70 … 33c259a0fc

May 232016
 

Not entirely sure how I managed to hose my user directory, but I did, and it followed a boot into safe mode (reboot and SHIFT) in order to update an ancient MacPorts installation; homebrew sort of replaced that for my usage. OK, no biggie. I have back ups right? I do, but those back up in recent months have been based on Apple’s Time Machine. I changed to this from Carbon Copy Cloner by means of experiment. CCC has been bullet-proof, and I have always used it for family members, but there was something enticing about the seeming simplicity of Time Machine… something that is great for restoring files, but not so great, it turns out, for a full system restore. Suffice to say that a combination of backup solutions really is the way to go.

There’s no point in documenting the failures of Time Machine to restore my system “as was”, better to say that from a hosed user directory (specifically something with ~/Applications and ~/Library), and after several attempts to restore:

Boot into guest user account and copy busted ~ dir to an external spinning platter hd.

Get new drive from Amazon of the UK; not the best price, but next day delivery, and that is pretty important right now. The Old Crucial MX100 500 GB drive may or may not be fsked, but It has gone through A LOT of write cycles over the past two years, and I could do with an additional drive in case of future failures anyway, so not pissing about, got the Samsung Evo 850, 500GB, and a few dongles. Very happy with the purchases, actually.

sammy-850-evo

sammy-850-evo and accessories

New, clean OS X 10.11.5 install

Hey… it’s an opportunity to clear out years of crud… old compilers, settings weird dot files all sorts of “system shit” that’s accumulated over the past 12 freaking years, and more than a couple of Macs, and to throw out apps that haven’t been used in Lord knows how long. It’s a bit of a PITA, but I think less so, perhaps, than dealing with all the quirks of years of accumulated cruft.

———
With the Sammy external, CMD+R boot into recovery mode, and select install new OS on the Sammy. OS X check the validity of the current system on disk and then goes and downloads El Cap. in this case. About 4 hours. Boot from the external drive. Create new admin user, log into iCloud with AppleID, then install:
## Apps
* Dropbox
* 1password
* HMA
* Firefox
Lord only knows what add ons and such I had installed. I guess these will come back to me on an as-needed basis
¡¡¡ Carbon Copy Cloner !!!
Alfred 2 because this is the way my fingers now work. And somewhat amazingly, and old post of mine proves to be surprisingly useful, and that is sort of the purpose of this blog thingamajig.  http://stephen.yearl.us/alfred-2-workflows/
* Flycut
* homebrew
brew install git (and zsh, imagemagick, lame, openssl, lua, tokyo-cabinet, urlview, npm)
brew cask install macvim
brew cask install mactex
brew install dnscrypt –with-plugins
— MUCH MUCH MORE AS AND WHEN REQUIRED

TexStudio
Skim PDF Reader

AppCleaner
Grand Perspective
Transmission

Textmate,
bundles and packages to come later
nvAlt
Sublime Text 3
IA Writer

Skype
WhatsApp
VLC
Screenflow 5
Handbrake
Pixelmator
Boom 2

Parallels
add VMs later… win 10, win 95 (yeah, really!), PC-BSD

Karabiner
Hammerspoon
Maid — a gem — deal with gems later!

## “Files”
* copy over ~/.zshrc, ~/Documents, ~/Music (Launch iTunes… all good), ~/Pictures (launch Photos… all good)
And now a working system that sort of is mine, but is not. Much tweaking remains.

Parallels VMs (Win 98, Win 10, Ubuntu Gnome) — didn’t back these up. Oh well. Never really used them much anyway.

=====
To do:

Source Tree
Newer git tools? The whole git issue is going to be interesting when I get to look at that.
Mathematica 9 — lost the license key?

Fonts — Cousine, Nitti, Yale?, Ancient Greek, Office Code Pro…Computer Modern…??
color profiles
NTFS drivers and shit
Bit torrent Sync ?
Mega ?
Cloud app ?
Google drive?
Rubies and management
Rails, pythons etc.
npm, node js etc
macports? Quite possibly the thing that got me into this mess, but then again this is a fresh install

Fluid app — protonmail, gmail, dict.cc, keybr

Adobe — EEK!!

Apr 242016
 

IA Writer to WordPress

0. Wha?

With the coming of the new doggie into the house, perhaps I will again add more content to the bloggy thing that I have kinda sorta not really been keeping over the last little while.

Probably this has been done by someone else on the Intertubz, but ach, why not. I have some time on my hands, so here are running notes in IA Writer that will make its way to a WordPress post by some means or other. There’s nothing special about IA writer, by the way. Well, there is, but not for the purposes of the WordPress posting. The same code should work with any plain-ish text file coming from any editor.

Why bother? Well, I think that the primary reason a lot of my notes have not made it to the blog is that it is just such a PITA to go out of my way to make a blog posting. If it all just sorta “works” from my usual workflows than that would perhaps be a very different situation. Not that I think I have anything particularly interesting or unique to say

1. This file

Is written in markdown, with metadata at the head:

Title: IA Writer to Wordpress  
Author: yearlus  
Email: [email protected]  
Date: 2016-04-26  
Format: complete  
post_status: draft  
post_date: 2016-04-26
post_title: IA Writer to Wordpress  
category: tech  
post_tag: text, editors, Ruby, code, Wordpress, workflow  


# [%Title]

2. Markdown processors

Four Ruby processors for playing with markdown are briefly alluded to here: markdown-processing-ruby

And I went ahead and played with two of these:

Redcarpet

$ gem install redcarpet -n /usr/local/bin

Kramdown

$ gem install kramdown -n /usr/local/bin

But neither of these processors support (yet!) the metadata blocks of MultiMarkdown. And kramdown does not recognise the back-tick code-fence (“` “`), only the tilda code-fence (~~~ ~~~)

So, install Fletcher Penney’s MultiMarkdown, and test:

$ brew install multimarkdown
$ multimarkdown ~/_scratch/IA-Writer-to-WP-Coleman-Notes.txt > ~/_scratch/IA-Writer-to-WP-Coleman-Notes.html

Gives some very nice HTML, including interpolation of the metadata (of this file), and writing of that metadata:

<head>
    <meta charset="utf-8"/>
    <title>IA Writer to Wordpress</title>
    <meta name="author" content="yearlus"/>
    <meta name="email" content="[email protected]"/>
    <meta name="date" content="2016-04-26"/>
    <meta name="format" content="complete"/>
    <meta name="post_status" content="draft"/>
    <meta name="post_date" content="2016-04-26"/>
    <meta name="post_title" content="IA Writer to Wordpress"/>
    <meta name="category" content="tech"/>
    <meta name="post_tag" content="text, editors, Ruby, code, Wordpress, workflow"/>
</head>

So the process for this exercise seems clear:
1. “~~shell out” to markdown and produce an html file~~
2. process that html with nokogiri
3. post to WordPress

No need to shell out, apparently. tillsc has already built a Ruby extension library around MultiMarkdown, Ruby MultiMarkdown 4, so
I guess the awkward bit would be how best to execute the ruby script that pulls all this together… from a services menu item, maybe? And then how to deal with edits… something in the metadata at the head of the file? A call to getPost call to XML RPC to see if an existing post “matching” (on what criterion?) that about to be posted exists? But what to check on? Is the old post deleted? I suppose when one starts thinking about these things then one might just as well produce an actual interface to WordPress, but why bother when there are so many such things anyway?

Maybe I will look into that… but I am reasonably happy with the fact that this post came from iA Writer, and without too much trouble either. Next up? A horror-show of a MultiMarkdown file in iA Writer to to see how much gets translated into a decent-ish looking post.

3. Code

Posting to WordPress is pretty straightforward. All the heavy lifting is done by the rubypress gem, which makes this sort of thing doggone simple (see what I did there!). Here a block of code from that thing I wrote a while ago that scraped a Koine Greek “Word of the Day” from Ἡ Καινὴ Διαθήκη. Last post here

# ========== Post to Wordpress ==========
if options[:wordpress_write] == 'yes'
  wp = Rubypress::Client.new(
    host:      "#{config['wp']['host']}",
    username:  "#{config['wp']['username']}",
    password:  "#{config['wp']['password']}",
    path:      "#{config['wp']['path']}")

  wp.newPost(
    blog_id:    '0',
    content:    {
      post_status:   'draft',
      post_date:     Time.now,
      post_title:    "#{html_title}",
      terms_names:  {
        post_tag:     ['greek', 'koine', 'κοινή', 'language'],
        category:     ['Greek']
      },
      post_content:  "#{wp_content}"
    }
  )
end
# ========== END WP Post ==========

 


posted with wpiawriter v. 0.1
Jun 242015
 

So somehow I managed to mess up my install of the pure prompt such that it was not loading async.

prompt_pure_setup:10: async: function definition file not found
prompt_pure_async_tasks:3: command not found: async_start_worker
prompt_pure_async_tasks:4: command not found: async_register_callback

How or why this happened I know not. Easy peasy to fix with npm, right?

❯ npm update &amp;&amp; npm install --global pure-prompt
&gt; [email protected] postinstall /Users/yearlus/node_modules/pure-prompt
&gt; dest=/usr/local/share/zsh/site-functions/; mkdir -p $dest &amp;&amp; ln -sf "$PWD/pure.zsh" $dest/prompt_pure_setup &amp;&amp; ln -sf "$PWD/async.zsh" $dest/async || echo 'Could not automagically symlink the prompt. Check out the readme on how to do it manually: https://github.com/sindresorhus/pure#manually'
[email protected] node_modules/pure-prompt

No problem. As the doco reads “Symlink pure.zsh to somewhere in $fpath with the name prompt_pure_setup. Symlink async.zsh in $fpath with the name async.”

❯ echo $fpath
~/.zfunctions /usr/share/zsh/site-functions /usr/share/zsh/5.0.5/functions
❯ ls ~/node_modules/pure-prompt
total 72
-rw-r--r-- 1 yearlus staff 5.8K Jun 1 12:25 async.zsh
-rw-r--r-- 1 yearlus staff 1.1K Apr 6 2014 license
-rw-r--r-- 1 yearlus staff 1.8K Jul 1 05:38 package.json
-rw-r--r-- 1 yearlus staff 8.3K Jun 1 12:27 pure.zsh
-rw-r--r-- 1 yearlus staff 5.4K Jun 1 12:25 readme.md
❯ cd ~/node_modules/pure-prompt
❯ ln -sf "$PWD/pure.zsh" ~/.zfunctions/prompt_pure_setup
❯ ln -sf "$PWD/async.zsh" ~/.zfunctions/async

 

Restart Terminal and… well there’s a pure prompt, but also a call from prompt_pure_setup claiming not to be able to find async. Messy. Uninstall and reinstall and the same issue remains. Grrr

Enter antigen which is to zsh what vundle is to vim.

❯ curl -L https://raw.githubusercontent.com/zsh-users/antigen/master/antigen.zsh &gt; antigen.zsh
source antigen.zsh

install a couple of extra bundles whilst I am at it:

❯ antigen bundle zsh-users/zsh-syntax-highlighting
❯ antigen bundle git
❯ antigen bundle sindresorhus/pure

with the head of my .zshrc reading:

1
2
3
4
5
6
7
8
9
10
11
# .zshrc
fpath=( "$HOME/.zfunctions" $fpath )
# antigen-- kinda a vundle/vim for zsh
source ~/antigen.zsh
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle sindresorhus/pure
antigen bundle git
# source ~/.zfunctions/async
# source ~/.zfunctions/prompt_pure_setup
# above 2 lines are symlinked from the .zsh files located in an antigen repo,
# but the links themselves are in ~/.zfunctions hence the commented-out antigen call

For “backup” I’ve

❯ ln -sf ~/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-sindresorhus-SLASH-pure.git/async.zsh ~/.zfunctions/prompt_pure_setup
❯ ln -sf ln -sf ~/.antigen/repos/https-COLON--SLASH--SLASH-github.com-SLASH-sindresorhus-SLASH-pure.git/async.zsh ~/.zfunctions/prompt_pure_setup

and now we are back to prompt loveliness.

Screen Shot 2015-07-01 at 07.14.35

Coloration of the prompt: http://stephen.yearl.us/terminal-colors/

Jun 152013
 

2016-05-23 update:

Due to recent woes I had to revisit Alfred Workflows… basically the below remains the same with the addition of:

http://www.packal.org/workflow/packal-updater
http://www.packal.org/workflow/datetime-format-converter
http://www.packal.org/workflow/toggle-keyboard-viewer
http://www.packal.org/workflow/leo-dictionary
http://www.packal.org/workflow/eggtimer-2
http://www.packal.org/workflow/units


Wolfram Alpha:

 

And behold! Easy access to a wealth of information, unit conversions, values for scientific formulæ and constants and the…


Timer:

http://dbader.org/blog/alfred-timer-extension

Very simple countdown timer. Nothing fancy, practically zero overhead.


Evernote:

 

http://www.alfredforum.com/topic/840-evernote-71-search-create-append-text-preview-and-more-all-within-alfred/


Onelook:

https://github.com/ChewingPencils/alfred_workflows

Searches http://www.onelook.com/

So:

  • olq QUERY == quick definition
  • olb QUERY == wildcard search http://www.onelook.com/?c=faq#patterns
  • olr QUERY == reverse lookup (lets you describe a concept and get back a list of words and phrases related to that concept.

Google Translate:

https://github.com/thomashempel/AlfredGoogleTranslateWorkflow

 

“Translate” + target lang code + phrase

 

 

Social Widgets powered by AB-WebLog.com.