Skip to content

Instantly share code, notes, and snippets.

View erikdoe's full-sized avatar

Erik Doernenburg erikdoe

View GitHub Profile
@erikdoe
erikdoe / mountefi.rb
Last active February 9, 2020 11:24
Mounts the EFI partition of the disk identified by the search string
#!/usr/bin/env ruby
search = "*1.0 TB"
efimnt = "/Volumes/EFI"
def run(cmd, &block)
puts "** #{cmd}"
if block == nil
system(cmd)
else
<!DOCTYPE html>
<html>
<head>
<script src="d3.min.js"></script>
</head>
<body>
<h1>A simple bar chart</h1>
@erikdoe
erikdoe / vislinks.md
Last active September 19, 2019 08:37
Resources for the Sommerschule Leipzig talk

Keybase proof

I hereby claim:

  • I am erikdoe on github.
  • I am erikdoe (https://keybase.io/erikdoe) on keybase.
  • I have a public key whose fingerprint is 028F 3C71 85ED 1AF5 1351 5716 F607 BE74 93B5 DC25

To claim this, I am signing this object:

@erikdoe
erikdoe / CCMKeychainHelper.m
Last active March 17, 2023 18:06
It took me way too long to wade through Keychain documentation and examples, but, finally, I got to a sane implementation of a basic Objective-C interface for managing internet passwords in Keychain. This is from my CCMenu project (http://ccmenu.org).
#import "CCMKeychainHelper.h"
@implementation CCMKeychainHelper
+ (BOOL)setPassword:(NSString *)password forURLString:(NSString *)aString error:(NSError **)errorPtr
{
return [self setPassword:password forURL:[NSURL URLWithString:aString] error:errorPtr];
}
+ (BOOL)setPassword:(NSString *)password forURL:(NSURL *)aURL error:(NSError **)errorPtr
@erikdoe
erikdoe / install_homebrew.rb
Created November 5, 2011 12:33 — forked from mxcl/install_homebrew.markdown
Installs Homebrew to /usr/local so you don't need sudo to `brew install`
#!/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like.
module Tty extend self
def blue; bold 34; end
def white; bold 39; end
def red; underline 31; end
def reset; escape 0; end
def bold n; escape "1;#{n}" end