pygments

Pygments is a python based syntax highlighter.

Examples:

pygmentize -f html -l python -O full -o file.py.html  file.py

pygmentize -l latex -O full -o resume.tex.html resume.tex
more ...

Lost Partition Table

Step 1: Losing the Data

We will start this post off with a tip...

Never ever ever re-install a distribution when you are tired.

Long story short, I was re-installing Ubuntu at way to early in the morning and clicked "Erase Entire disk" about 2 seconds later I panicked and …

more ...


indent

Indent is an program that can reformat C code for you.

Today, someone emailed me their strangely formatted code and I decided before I even looked at it that I would run it through "indent." After looking through the man page for the "correct" flags, I settled on a style …

more ...


MLA in latex

I wish that I had know about latex back in high school when I was writing my MLA styled papers. For example the following template could be used to make a MLA paper for the user really simply.

\documentclass[12pt,letterpaper]{article}
\usepackage{ifpdf}
\usepackage{mla}
\begin{document}
\begin{mla …
more ...

Grub issues

DateTagsgrub

I killed my grub a enough times that I wrote this "script" to chroot into my system from a live cd / usb

To chroot in to a system with lvm2:

yes | sudo apt-get install lvm2
sudo vgchange -ay big
sudo fdisk -l /sda
sudo fdisk -l /dev/sda
sudo mkdir …
more ...

SOPA Blackout javascript "landing page"

Some code I modified from sopablackout.org to fit the needs of the Open Source Club. It temporarly blacks out the page until the user clicks. This however could be used for any type of important webpage announcement. You should probably talk to sopablackout.org for rights to this code …

more ...

Bazaar

A presentation I gave to the Open Source club as an introduction to Bazaar:

Introduction

Bazaar is a distrubuted revision control system sponsored by Canonical

  • written in python
  • packages for GNU/Linux, Mac OS X, and Windows.
  • FOSS
  • intuitive commands
  • easy to use
  • support for working with other systems
    • git …
more ...

Brightness

If you want to adjust your screen brightness in Linux (Debian / Ubuntu) from the command line you can write to a file:

/sys/devices/virtual/backlight/acpi_video0/brightness

The maximum value for this variable is listed in the file:

/sys/devices/virtual/backlight/acpi_video0/max_brightness

A script can easily be …

more ...

Dual Displays

I was using awesome window manager and trying to connect an additional monitor to my computer with a vga port. A friend recommended xrandr. A quick look at the man page and you'll find:

xrandr -q

will list off all the connected display devices. I see four listed: LVDS1, HDMI1 …

more ...