whatsdoom.com

indent

DateTags

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 ...

Image Resizing with Image Magick II

DateSeries Part 2 of Image Magick Tags

I already posted about image magick before but since this time I actually needed to use it, I found the "for" statement to work better than find.

$ for i in *.jpg; do echo "$i"; convert "$i" -resize 600x "$i"; done

Edited:

$ for i in *.JPG; do echo -e "$i...\c …
more ...

MLA in latex

DateTags

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

DateTags

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"

DateReadtime 11 minutes Tags

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

DateReadtime 4 minutes Tags

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

DateTags

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

DateTags

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 ...