Skip to content

Instantly share code, notes, and snippets.

@cfebs
cfebs / Rakefile
Created May 23, 2011 02:51
A fix for the install script in gedit-rails
desc "Installs the Plugins"
task :setup do
gedit_is_running = system("ps -eo comm | grep ^gedit$")
user = ENV['USER']
if gedit_is_running then
puts "Please close gedit"
elsif user != "root" then
puts "You need to sudo this action"
else
#system("killall gedit")

Virtualbox Ubuntu Server with OpenSSH

What this will get you:

  • A true linux shell without Cygwin on Windows. Essentially an SSH server sitting on your desktop which I have found perfect for web development using a powerful editor like vim or emacs + screen.

Initial Steps

@cfebs
cfebs / xboxrefresh
Created December 1, 2011 01:01
refresh windows -> xbox sharing
# refresh windows -> xbox sharing
# if for some reason your xbox is not showing all your movies or music, run this on the PC hosting it
# open a command prompt (Windows Key + R type cmd)
NET STOP WMPNetworkSvc
NET START WMPNetworkSvc
@cfebs
cfebs / gist:3025311
Created June 30, 2012 20:11
broadcom
open your package manager and search for 'bcm'
uninstall the bcmwl-kernel-source package
make sure that the firmware-b43-installer and the b43-fwcutter packages are installed
type into terminal:
@cfebs
cfebs / craft.md
Created July 18, 2012 01:26
craft

Guide

# apt-get is the package manger, installs software etc
# update, gets the latest package lists
sudo apt-get update

# upgrade
sudo apt-get upgrade
@cfebs
cfebs / gist:3732955
Created September 16, 2012 15:58
nub emacs config
;;require 'package)
;;(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
;;(package-initialize)
(add-to-list 'load-path "~/.emacs.d/")
(let ((default-directory "~/.emacs.d/src/"))
(normal-top-level-add-subdirs-to-load-path))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; native stuff
@cfebs
cfebs / linux.md
Created November 6, 2012 04:36
linux

Linux

So here's the big guide of everything I have learned through about 4yrs of tinkering with this shit.

Why

Ruby, Python, pretty much anything open source and text based thrive on linux. It's the environment they were built to be used in, not Windows. In Windows you need to go get a weird exe, in some cases you have to manually do path editing, it's really common, but it sucks and is a giant pain in the ass to work with.

@cfebs
cfebs / snips.md
Created November 30, 2012 03:10
crunchbang-snippits

Linux Sandbox Drive

Assumes:

  • Windows already installed as master boot on another hard drive
  • We want a place to try out distros on another HD

The other HD is completely free

/

/swap

#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
# create our directories