Get rid of caps lock pop up

Apparently some people have a Key Settings tab in the Keyboard section of the Control Panel.  However if you don't have one, this registry key is a work around to turn this annoying pop up off.

HKEY_LOCAL_MACHINE > SOFTWARE > Widcomm > BTConfig > General > KeyIndication

The value will be 1, set it to 0.

Quick and Dirty QR Code Generation

  1. Go to http://goo.gl
  2. Create a shortcut to the site you want
  3. Copy the Short URL you're provided and now add ".qr" (without quotations) to the url
  4. Browse to this location and you will get a png image of the QR code you can download

Remove annoying icons from Visual Studio main interface

Visual Studio 2013 is a horrible, metro-styled abomination that makes me want to immediately stop doing any development in Microsoft languages, but that is a story for another day.  Some of the awful UI "enhancements" that came with the Metro styling are a group of useless (for me at least) icons in the upper right hand corner of the VS window, including Notifications, Feedback, Quick Launch, and Sign In.  I'm not interested in their product updates (Notifications), Feedback is already easily found in the Help menu, Quick Launch generally takes the same amount of time as selecting the same function from the menu, and I see no value in the Sign In.  So, I should be able to go through the options and disable these icons that I don't want, right?  Wrong.  Microsoft as usual is more interested in making decisions for you with a one-size-fits-all mentality.  However, there is a bit of luck in this case and that is that the display of these annoyances is controlled by a registry setting. 

Warnings:  Editing the registry can cause serious and irreparable damage to your operating system.  Do not edit the registry if you do not know what you're doing.  Do not edit the registry without backing up any entries you plan to remove or edit.  I am not responsible for anything you do with this information. 

If you navigate to the following key in the tree,

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\MainWindowFrameControls

you will be able to expand this key to show several keys under it, each has a name which is a GUID surrounded by curly brackets.  If you click on each of then, you can view the keys in that "folder", notice that each has a key called "(Default)" and that the value of this key corresponds to one of the previously mentioned UI elements.


I have four keys here, yours may vary:

{304ee989-b7c9-46c8-aa48-f080bc47cee0} <==> UserNotifications Badge
{73988e61-7e30-4e87-b891-23b5e460db21} <==> User Information Card
{af24dacc-4700-4ef1-9322-be84c428a681} <==> QuickLaunch Control
{F66FBC48-9AE4-41DC-B1AF-0D64F0F54A07} <==> Feedback Button

You can right click the "folder" in the left hand panel and select Delete to remove that key and all the keys inside it.  Once you have removed the item(s) you no longer wish to see, close and reopen your Visual Studio window and voila, annoying UI elements gone.

Before & After



Using the Onkyo app to turn on the receiver

The Onkyo app is very convenient for controlling your receiver and queuing up songs from a media server but one problem is that if the receiver is turned off, you can't turn it on from inside the app.  Or can you?  The trick is that you need to put the receiver into Standby mode.  The way to enable Standby mode is to turn on the HDMI pass-through function.
  1. Press the Setup button
  2. Navigate to [Hardware Setup] > [HDMI] > [HDMI Through]
  3. Set to Auto
While in Standby mode, you can connect using the app and power up the receiver.

Installing dropbox on a headless linux machine

What you need for this guide

  • A headless linux machine.  This guide is intended for a debian-based system but may work on other distros.
  • Glance over the Dropbox linux install guide to get the jist of what we will do.
    • Decide if you need the x86 or x64 version based on your processor type.

How to set up dropbox

At the command line, you will run one of the two commands, based on your processor,


cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -


When it's done installing, we're going to want to initialize it,


~/.dropbox-dist/dropboxd


which will give us the following output


This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=3f815ada4c4842c2aa7de9239072532e to link this device.


Copy the link (your link, not mine) and paste it to your browser, leave the command running during this process.  When it's linked, you should see the following output (where ____ is the name on your account),


This computer is now linked to Dropbox. Welcome ____.


Now, we're linked to Dropbox but we still want a way to control it easily.  We're going to want to download the python script, we'll put it in the same installation folder we just created to keep things tidy. (Note, if you don't have python installed, you need to install it now.)


wget -O ~/.dropbox-dist/dropbox.py https://www.dropbox.com/download?dl=packages/dropbox.py


To create a nice shortcut to launch the dropbox script, you can create an alias like so,


alias dropbox='python ~/.dropbox-dist/dropbox.py'


Don't forget to add it to your .bashrc file if you want it to be available next time you log in.  With the alias created, we can now access dropbox easily.

Using dropbox


~$ dropbox

Dropbox command-line interface

commands:

Note: use dropbox help <command> to view usage for a specific command.

status get current status of the dropboxd
help provide help
puburl get public url of a file in your dropbox
stop stop dropboxd
running return whether dropbox is running
start start dropboxd
filestatus get current sync status of one or more files
ls list directory contents with current sync status
autostart automatically start dropbox at login
exclude ignores/excludes a directory from syncing
lansync enables or disables LAN sync


To kick things off, you begin with


dropbox start


To check on the status, use


dropbox status
 

Don't be alarmed if the status stays in "Starting" for a long time the first time you run it.

If you have the same dropbox account installed on other machines on your network, you can speed up your sync and decrease your bandwidth usage by letting dropbox sync using the files already on your other machine(s).  You can enable lansync like so,


dropbox lansync y
 

The linux version of dropbox will put all of your files into the following location ~/Dropbox.  If you don't want to sync your entire dropbox folder, you can have it exclude folders and files like so,


dropbox exclude add ~/Dropbox/FolderToExclude
 

If you copy some stuff into your dropbox and you're waiting to see if it's ready yet, you can execute the following command,


watch -n 30 python ~/.dropbox-dist/dropbox.py status
 

This will output your dropbox status every 30 seconds and will show "Up to date" when you are synched.

Use large USB hard drives with the PS3

In order for an external hard drive to work with the PS3 (and many many other devices), it must be formatted to FAT32. Unfortunately, file systems are normally limited to 32G. However hard drives with FAT32 can actually function at much larger sizes with a little bit of hardware trickery. 

That's where this tool comes in. Ridgecorp makes a utility called Fat32Format that is capable of formatting large hard drives to FAT32 to make them accessible on older devices. 

Be warned! This is an expert-level tool. Be extremely careful while using it! Double and triple check that you are formatting the intended drive before you start the process!

Turn your Raspberry Pi into a white noise machine

What you need for this guide

  • A Raspberry Pi with debian* installed
  • The Internet
  • A 3.5mm male-to-male ("headphones"-style) audio cable
  • An old stereo with auxiliary input
**This guide is based on debian/raspian however it may work in another distro.

How to set up the Pi

With your Pi connected to the internet, at the command line type in


sudo apt-get update
sudo apt-get install sox
export AUDIODEV=hw:0,0
export AUDIODRIVER=alsa


This installs sox and set the environment variables needed for the Pi to find your audio device.

Now open the startup jobs list,


sudo nano /etc/crontab


and insert the following text into a new line at the end of the file.


@reboot pi play -b 16 -n synth 0 brownnoise


Close the file and save.  This will create brown noise, which I find more soothing than white but you can also use white noise or pink noise by replacing "brownnoise" with "whitenoise" or "pinknoise".  Note that we are specifying 16bit output because 32 is not supported.

The final steps


The sound we selected will now automatically start playing on boot. Plug your 3.5mm cable from the Pi into your stereo and plug in the power cable.  Note that it will take a minute for your Pi to boot up before you get any audio.  Turn on the stereo and adjust your bass and treble levels to your preference so that the noise generated is exactly how you want it.

Some Considerations


While you may need a keyboard, ethernet, and monitor to set up the script, presumably, you're going to want to plug in only the audio and power cables when you actually set it up to your stereo.  This means you will not have a way to properly shut down the Pi when you want to turn it off.  Turning off the Pi without shutting down has a small chance of damaging data on the memory card and making the Pi unable to boot.  For this reason, you should try to avoid turning off the Pi unnecessarily.  You might also consider backing up your memory card.

Enjoy!

No talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

After install samba on a new Ubuntu build, I noticed I kept getting this error when I ran any command with sudo


no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
WARNING: Ignoring invalid value 'share' for parameter 'security'


The culprit seems to be libpam-smbpass.  According to launchpad, libpam-smbpass is a
pluggable authentication module for Samba

 This is a module for PAM that enables a system administrator to migrate
 user passwords from the Unix password database to the SMB password
 database as used by Samba, and to subsequently keep the two databases in
 sync. Unlike other solutions, it does this without needing users to log
 in to Samba using cleartext passwords, or requiring them to change their
 existing passwords.
If you have no intention of using it, an easy way to get rid of the error is to remove it,


sudo apt-get remove libpam-smbpass

Bash script: convert FLAC to MP3

Requirements

  • lame (sudo apt-get install lame)
  • flac (sudo apt-get install flac)
  • directory with flac files

Script



#!/bin/bash
flac -d *.flac
find -name "* *.wav" -type f | rename 's/ /_/g'
for i in $( ls -b *.wav ); do
  lame -hV0 $i
  rm $i
done
find -name "*.mp3" -type f | rename 's/_/ /g'


This script will decompress the flac files to wav files, remove any spaces in the file name, it will then convert the wavs to mp3 using lame's highest variable bitrate setting, then finally replace the underscores back to spaces.  If you don't want spaces in your file names, you can remove the last line.

To use the script, create a new file on your system, copy the contents of the script inside, give it executable properties (sudo chmod +x scriptname), then run it in the directory containing the flac files, (./scriptname) where scriptname is the name of your script.

Enjoy!

Prevent removed videos from disappearing on Youtube playlists

Playlists are a great feature in Youtube.  Unfortunately, if the video owner removes their video from Youtube, although you get a warning message from YouTube



You are left with an empty space in your playlist that gives you no clue as to what had been in that slot.



The work around is to use the Add / Edit notes feature of the playlist.




Click [Add / edit notes], and in the dialog that pops up, highlight and copy the name of the video, then paste that text into the text description.



Now click Save.  Now, if the owner of the video deletes the video, even though the title of that removed slot in your playlist will still say "[Deleted Video]", now your custom text will still be there, telling you the name of the video that was removed.  In most cases, you can find another copy of the same video and re-attach it to your playlist.  Problem solved!

Enjoy!