Skip to content

Instantly share code, notes, and snippets.

View copremesis's full-sized avatar
:octocat:
Focusing

Robert Ortiz copremesis

:octocat:
Focusing
View GitHub Profile
@copremesis
copremesis / OSX Secure Disk Wipe.md
Last active August 13, 2020 04:08 — forked from joeblau/OSX Secure Disk Wipe.md
Securely erase an external disk using dd on OSX

Securely erase an external disk using dd on OSX

  1. Plug in your SD card, HDD, or other block device and then use the following command to see which /dev/diskN node it's located on:
diskutil list
  1. Unmount the disk where N is the number of the disk taken from the above command:
@copremesis
copremesis / node-and-npm-in-30-seconds.sh
Created February 23, 2016 20:22 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
# Represent states such as 'active', 'disabled', etc in the DB as an int
#
# Use like so:
#
# class MyModel < ActiveRecord::Base
# include StuffedTableColumns
# stuffed_column :status, *(%w(active inactive blocked disabled banned))
# end
# TODO: use method_missing to match the column name