Skip to content

Instantly share code, notes, and snippets.

@mmcdaris
mmcdaris / sfsu_irc.md
Last active December 26, 2015 11:49
SFSU IRC Tutorial

Download a Client to connect to irc:

OSX where ( version >= 10.7 ) Colloquy

colloquy

Windows you can use xchat

xchat

Here is a list of clients

connect to the the irc.freenode.net server

$ git push heroku master
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
New app detected loading default bundler cache
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Using rake (10.1.0)
#
curl -o xubuntu.iso http://mirror.anl.gov/pub/ubuntu-iso/CDs-Xubuntu/12.10/release/xubuntu-12.10-desktop-amd64.iso
# iso to img
$ sudo hdiutil convert -format UDRW -o ./xubuntu.img ./xubuntu.iso
Password:
Reading Driver Descriptor Map (DDM : 0)…
Reading Xubuntu 12.10 amd64 (Apple_ISO : 1)…
Reading Apple (Apple_partition_map : 2)…
Reading Xubuntu 12.10 amd64 (Apple_ISO : 3)…
@mmcdaris
mmcdaris / er.sh
Created December 7, 2013 08:26
error on checking simlinks
mmcdaris@mmcdaris-desktop:~/Desktop$ ls /lib/x86_64-linux-gnu/libudev.so*
ls: cannot access /lib/x86_64-linux-gnu/libudev.so.0: Too many levels of symbolic links
ls: cannot access /lib/x86_64-linux-gnu/libudev.so.1: Too many levels of symbolic links
/lib/x86_64-linux-gnu/libudev.so.0.13.0
@mmcdaris
mmcdaris / tunnel.conf
Last active December 30, 2015 16:18
reboot persistent ssh tunnel
# location: /etc/init/tunnel.conf
description "persistent ssh tunnel through reboots"
author "morgan mcdaris <[email protected]>"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on runlevel [016]
respawn
respawn limit 5 60
@mmcdaris
mmcdaris / output
Created January 29, 2014 07:11
Hello world reversed?
➜ C cc -o hello hello.c
➜ C ls -la
total 40
drwxr-xr-x+ 5 mmcdaris staff 170 Jan 28 23:06 .
drwxr-xr-x+ 108 mmcdaris staff 3672 Jan 28 14:57 ..
-rw-r--r--+ 1 mmcdaris staff 78 Jan 28 22:38 Makefile
-rwxr-xr-x+ 1 mmcdaris staff 8496 Jan 28 23:06 hello
-rw-r--r--+ 1 mmcdaris staff 60 Jan 28 22:40 hello.c
➜ C ./hello
Hello, world.
@mmcdaris
mmcdaris / show_em.rb
Last active August 29, 2015 13:56
show me the colors!
colors = []
(20..130).each do |num|
colors << "\033[#{num}m#{num} \033[0m"
end
colors.each_slice(10).each { |ar| ar.map {|c| print c }; puts "\n" }
@mmcdaris
mmcdaris / export_style.js
Created February 18, 2014 17:53
Making a node module 3 different ways
// Attachment to exports style
var name = exports.name = 'module_one';
var pass = 'beer';
exports.lower = function(input) { return input.toLowerCase() };
exports.upper = function(input) { return input.toUpperCase() };
exports.get_name = function() { return name };
exports.get_pass = function() { return pass };
@mmcdaris
mmcdaris / .vimrc
Created February 23, 2014 05:59
simple vimrc for fresh machines
" syntax and line numbers
set nu
syntax on
set ruler
" use vim settings
set nocompatible
" Tab customization
set autoindent
set expandtab
set softtabstop=2