Skip to content

Instantly share code, notes, and snippets.

View eparadis's full-sized avatar
💭
getting things done

Ed Paradis eparadis

💭
getting things done
View GitHub Profile
@ttscoff
ttscoff / appinfo.md
Last active March 4, 2024 12:00
appinfo: A quick ruby script for Mac that returns some information for a specified Mac app in Terminal. Includes icon display if using imgcat or chafa are available.

appinfo

A script for getting details of installed Mac apps. Like Get Info but faster and cooler.

Save the script below as appinfo somewhere in your path. Make it executable with chmod a+x appinfo. Then just run appinfo APPNAME to get info on any installed app.

@rudelm
rudelm / autofs.md
Last active May 15, 2024 17:28
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

@mamonu
mamonu / qcow2vdi.sh
Last active April 22, 2024 09:39
convert a qcow2 vm to a VirtualBox vm format
qemu-img convert -O vdi gnome.qcow2 gnome.vdi
#if its a raw image then:
VBoxManage convertdd opnstk.raw VBox.vdi --format VDI
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@azadkuh
azadkuh / vim-cheatsheet.md
Last active May 3, 2024 11:50
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

var lm = {
buildDefaultAccumulator: function() {
return new lm.Accumulator(0);
},
version: '0.1'
};
lm.Accumulator = function(initial) {
this.value = initial;
@lbruder
lbruder / lbForth.c
Created April 6, 2014 15:21
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@tijs
tijs / Ubuntu-on-mac-mini.md
Created January 1, 2014 16:43
Installing Ubuntu on my Mac Mini (2009). Dual boot installation of Mac OS X Mavericks and Ubuntu 13.10
  1. Install rEFIt: http://refit.sourceforge.net/doc/c1s1_install.html

  2. Create a new FAT/DOS partition for the linux install (dual boot setup)

  3. Download the linux ISO, in this case: http://www.ubuntu.com/download/

  4. Convert the iso to a bootable img format:

    cd ~/Downloads hdiutil convert -format UDRW -o ubuntu-13.10-desktop-amd64.img ubuntu-13.10-desktop-amd64.iso

  5. Partition your USB stick as 'Free space' using Disk Uility

  6. Find the name of your USB 'disk' with diskutil: