Bind a key in Linux to Increase/Decrease the Volume

Using these instructions I was able to set Shift + Page Up to increase the volume, and Shift + Page Down to decrease the volume. These instructions are for Ubuntu 13.04 with XFCE but should work with Unity or other distributions. The code below also works if you want to control the volume via a shell script or program.

Open the Keyboard control panel and choose the Keyboard Shortcuts tab

Click Add

Enter the command:

amixer -D pulse sset Master 5%-

Press OK, then it will ask you to type the desired keyboard shortcut. I pressed Shift + Page Down.

Create another one, this time enter for Volume Up:

amixer -D pulse sset Master 5%+

And then press another shortcut, I used Shift + Page Up.

How to add your signature to any PDF for Free!

Are you digitally filling out a housing lease or work employment contract and need to sign your PDF and e-mail it? If you’re like me, you’re tired of having to deal with printing and mailing contracts. Here’s how to insert your signature on a PDF using completely free software.

1. Download the free GIMP software

GIMP stands for “GNU Image Manipulation Program”, and is similar to Photoshop. The user interface is not as nice but it doesn’t cost anything, works on multiple platforms, and performs most of the typical functions you would need.

Continue reading

How to listen to Spotify for a long time without ads

Here is a quick and easy way to listen to Spotify for long periods of time without listening to ads and without paying for the PRO service. Note: Only applies if you like DJ mixes of Trance, House, and other genres of Electronic Dance Music.

  • Search spotify for the word “continuous”
  • Sort by Duration, Descending.

You’ll get a long list of full continuous DJ mixes over 1 hour long (some as long as 79 minutes). You can listen to these tracks in full with no ad interruptions. Sometimes you can listen to two of them consecutively before hearing an advertisement! Continue reading

How to Rotate a Multi Page PDF in Ubuntu Linux

So you have a PDF file that might be one or more pages, but you want to rotate the pages? Use these simple steps from your Ubuntu Linux command line terminal:

  1. Run sudo apt-get install python-pypdf (you need this to modify PDFs with Python)
  2. Create a text document to contain this python code:
    #!/usr/bin/env python
    import sys
    from pyPdf import PdfFileWriter, PdfFileReader
    input = PdfFileReader(sys.stdin)
    output = PdfFileWriter()
    for i in range(0,input.getNumPages()):
        output.addPage(input.getPage(i).rotateClockwise(90))
        output.write(sys.stdout)

    You can change 90 to -90 to rotate the other direction (left instead of right).

  3. Save & Close the file as rotatepdf.py
  4. Run chmod 755 rotatepdf.py to make it executable
  5. Run ./rotatepdf.py < input.pdf > output.pdf

Input.pdf is your original PDF file that is not rotated. Output.pdf is the PDF after rotation is applied (do not use the same filename for both).

Install Google Wallet on a Verizon Galaxy Nexus with Android Jelly Bean 4.1

I have a Verizon Wireless (VZW) Galaxy Nexus and upgraded it to Jelly Bean 4.1 as soon as I got my hands on it. But I couldn’t get Google Wallet installed on it because Verizon is stupid. It’s hidden from the Google Play store if you’re on Verizon, and often loading APK copied onto the device didn’t work for me either. But this post did the trick for me!

Steps:

  • UPDATE 2 for Sept 14, 2012: Verizon has blocked Google Wallet again! But luckily there’s a simple solution for Verizon Galaxy Nexus ICS & Jelly Bean owners: Download and run this updated APK file (if the file is no longer available, Google search for “Wallet_1.5-R79-v5.apk” and you should find it somewhere). Follow steps below to install it.
  • >Download the APK file from this post< (you have to register on the forum to download it =(
  • UPDATE: If that APK does not work for you, try the one >in this post< (thanks Tory Silvers)
  • In Root Explorer (ES File Explorer works too if you enable Root browsing), copy the apk file you want to put in /system/app
  • Navigate to the /system/app directory
  • Tap the Mount R/W button on the top right (not applicable with ES File Explorer)
  • Tap Paste
  • Scroll down to the pasted apk, long press on it and select Permissions (you’ll see 9 check boxes when you do this)
  • Check the Read and Write buttons for User
  • Check only the Read box next to Group and Others, then tap OK (once you’re done, the read/write permissions under the app name should be the same as all the other apps listed (rw-r–r–))
  • Reboot the phone

How to Set Up Logitech M510 USB Mouse on Ubuntu 12.04

Logitech has a great selection of USB mice for all operating systems and they often work without installing any software. Sometimes to get the most out of it however, you can configure your xorg.conf file on Ubuntu 12.04 and some previous Ubuntus. After plugging in the Logitech M510 USB wireless laser mouse, make sure the batteries are in and it is turned on. Then put this code into your /etc/X11/xorg.conf file:


Section "InputDevice"
Identifier "Logitech Mouse"
Driver "evdev"
Option "Protocol" "evdev"
Option "Name" "Logitech USB Optical Mouse"
Option "Phys" "usb-*/input0"
Option "Device" "/dev/input/by-id/usb-Logitech_USB_Receiver-mouse"
Option "Buttons" "8"
Option "ZAxisMapping" "4 5"
Option "Resolution" "1200"
Option "CorePointer"
EndSection

Note: If your xorg.conf file already has a section labeled “InputDevice”, replace it with this one.

It is recommended that you copy your current xorg.conf file to another one using the “cp” command before using this code. After it is done, restart your computer (logout/login might also work).

Anonymous Member takes down thousands of websites in GoDaddy attack

Earlier today, DNS and other servers at GoDaddy became unresponsive, throwing thousands of websites hosted there (including Snooth.com, the internet’s largest interactive wine website and where I work) offline.

Anonymous “Security Leader” @AnonymousOwn3r claims to be behind the take-down, who also points out that it is not Anonymous acting as a whole, just one person.


UPDATE: GoDaddy claims down time was caused by their own incompetency, not a hacker. Who do you think is right? Either way, this puts GoDaddy in a bad light.


According to AnonymousOwn3r, he is taking GoDaddy down to “test how the cyber security is safe” and for other reasons that cannot be disclosed at this time — perhaps keeping secret some sort of security exploit or hole.

Late last year, the internet was in a fury after GoDaddy announced its support of the US government’s proposed SOPA to censor websites just like what communist China does.

Sublime Text 2 Plugin to Convert Tabs to Spaces on Save

Here is a simple Sublime Text 2 plug-in to convert tabs (only at the beginning of lines) to spaces in the current file whenever you save it.

In Sublime, go to the Preferences menu and choose Browse Packages… This will open the Sublime Text 2 Packages folder. Create a new folder here with your last name, then open your new folder (you just created your own Package!)

Next, create an empty file in the folder called “tabs_to_spaces.py”. Paste this code into the file:

import sublime, sublime_plugin

# class ExampleCommand(sublime_plugin.TextCommand):
#   def run(self, edit):
#       self.view.insert(edit, 0, "Hello, World!")

class ConvertTabsToSpaces(sublime_plugin.EventListener):
    def on_pre_save(self, view):
        edit = view.begin_edit()
        view.run_command('expand_tabs', {"set_translate_tabs": True})
        view.end_edit(edit)
        #sublime.message_dialog("Converted endings.")

This creates a hook and runs whenever you save the file, but right before the save actually occurs, allowing you to modify the document text. In this case all we did was run the menu command “expand_tabs”. You could also run other commands or perform custom text replacements.