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.

How to mount a DVD ISO as a drive in Ubuntu Linux

No additional software required. First, create a directory in which to mount the ISO.

mkdir -p ~/media/iso

Then, to mount it:

sudo mount -o loop /home/path/to/my_fun_dvd.iso ~/media/iso
nautilus ~/media/iso

The last line is to open the mounted directory in a visual file browser called Nautilus.

If you end up doing this often, you can create a bash function. Put this at the end of your ~/.bashrc file:

function mountcd {
sudo mount -o loop $1 ~/media/iso
}

Save the file, reload it in bash using this command

. ~/.bashrc

That’s (period)(space)~/.bashrc — the period is a command in bash that reloads the script file without having to launch the terminal again.

Now you can do this in the terminal:

mountcd ~/Downloads/my_cool_dvd.iso

And your DVD ISO will be ready for viewing in the ~/media/iso directory (the tilde character means your home directory, /home/john). In Ubuntu 12, by opening the folder containing the DVD files, it will prompt you to open with VLC media player:

Music made with unusual instruments

Making music will always be a part of human culture. It’s interesting that people find ways of creating music no matter what situation they’re in, and this includes urban environments. Thanks to YouTube you can watch and listen to all of these different creations.

Pen Tapping

It’s amazing what you can put your mind to when bored at school (or in detention…)

Street Drumming

Just find whatever buckets or metal bins you can and go to town!

One man band

Croatia

Mbira

This just sounds really cool and unique.

Beatbox with Harmonica

Performer: Yuri Lane

Execute a command for each file in a directory recursively on Linux

I recently wanted to make a change — actually a string replacement — in every file in the current directory and all directories beneath it, perhaps filtering by file extension. In this case, I wanted to change four spaces to a tab character in every .php source file. I created a small BASH shell script file to do this, though you could also just run the command directly at the command line:

find . -type f -name '*.php' -exec sed -i 's/    /\t/g' {} \;

Explanation:

  • find lists all files, one per line, in the current directory and all subdirectories recursively
  • . (period) means current directory
  • -type f only list files, not directories.
  • -name ‘*.php’ only if the name matches * (wildcard) with “.php” at the end
  • -exec execute the following command for each result that matched
  • sed -i ‘s/    /\t/g’ replace, or substitute, one string for another. I’m searching for four consecutive spaces and replacing with t, meaning tab character. the /g at the end means global, replace each instance wherever it may appear in the file on each line. -i means “edit file in place” so the modified file is saved back to itself.
  • {} this inputs the file for the sed command
  • \; I think this finishes the -exec parameter for find. Don’t forget the backslash

To change spaces to tabs or tabs to spaces, you can also look into the expand and unexpand commands.

Overall I highly recommend learning the sed command for quick and easy find & replace operations in text files.

More examples of the find command with -exec:

Delete all directories matching a name, such as CVS, under the current directory:

cd /path/to/myproject/directory/src
find . -type d -name 'CVS' -exec rm -rf {} \;

Linux – Disk Usage (du) Sorted by Size

Here’s a simple way to find how much disk space is taken up by each folder in a directory, and sort it by size. This works in pretty much any Linux distribution (Ubuntu, Fedora, CentOS, and more).

du --block-size=MiB --max-depth=1 | sort -n
  • du is the disk usage and will, by default, recursively traverse every directory of the current one, listing the size of the directory by bytes. Without options, it isn’t very helpful (press Ctrl C to stop the process safely)
  • –block-size=MiB will convert the bytes amount to megabytes (or Mebibytes), so instead of showing 9437184 (bytes) it will show 9 MiB
  • –max-depth=1 will only list size of directories in the current directory. 2 will traverse an additional level down, and so on.
  • | sort -n will transfer, or “pipe”,  the output of the du program to the sort utility which simple sorts lines sent to it. -n tells it to sort numerically.
  • If you want to sort in reverse order, simply change n to rn
Example output:
statik@Phenom:~/Pictures$ du --block-size=MiB --max-depth=1 | sort -n
1MiB ./icons
1MiB ./USTM
1MiB ./vector
1MiB ./Webcam
3MiB ./animated
3MiB ./wallpaper
8MiB ./UltraMiami
688MiB ./2010
1600MiB ./2011
2306MiB .

As you can see, when I run this command in my Pictures folder, I have 688 MB of pictures in 2010 and 1600 MB of pictures in 2011.

You can add a shortcut to the command (an “alias”) by adding this to your ~/.bashrc or ~/.bash_aliases file

alias duinfo='du --block-size=MiB --max-depth=1 | sort -n'

The next time you open a terminal you can simply type “duinfo” and it will execute the alias. Tab completion also works.

Additional Tip: the ls (directory listing) command also supports the –block-size=MiB statement. Use –block-size=KiB for kilobytes, GiB for gigabytes, and so on.

Related Article: http://www.earthinfo.org/linux-disk-usage-sorted-by-size-and-human-readable/

Fixing a Keyboard After Spilling Liquid On It

UPDATE: After working fine for a few days post-cleaning, some of the keys stopped working again for some reason :(. The process was a failure.

Well this was probably one of the dumbest things I’ve ever done. Late last night while playing Starcraft II with a friend online, I spilled some wine that got all over my desk including my expensive TypeMatrix keyboard. It’s probably one of the worst liquids to spill anywhere, let alone on computer parts! After frantically trying to dry it and leaving it alone overnight, some of the keys just didn’t work anymore. I thought, could this be fixed? I might as well try before dropping $110 for a new one.

The following instructions may vary depending on the type of keyboard you have. Actually if you’re fixing a laptop keyboard the instructions will be very similar. Here’s the steps to repair:

Continue reading

A Solution to the Software Patent Problem?

Patents in the USA were intended to protect inventors against people copying, reproducing, and selling their own creations. But with software, things have gone awry with companies like Apple and Microsoft patenting the stupidest things — hoping they will slip through the US patent office and be accepted. And now to defend oneself from being sued for patent infringement, huge companies are scooping up patents in billion dollar buys. Apple and Microsoft recently paid $4.5 billion for Nortel‘s patent pool, and Google bought Motorola Mobility for $12 billion which included their patent pool.

This is a tremendous amount of money spent which isn’t even for any tangible product, research, or manpower. In the long run this is going to cost consumers by raising product prices (Microsoft gets $5-10 for every HTC phone sold, even though there is absolutely no Microsoft product or technology in it).

I was thinking about the patent problem and how it could be changed to protect the individual or company inventions but prevent big businesses from bullying other companies and hurting the consumer. What if patents could not be transferred to another individual or company without being released into the public domain? In other words if you hold a patent for something that you invented, you would still be fully protected by that patent, but you could not sell or transfer that patent power to someone else. If you decided to sell your company or go out of business, the patents automatically get released in the public domain.

This solution would protect the inventor (person or company) that invented the “thing”, but prevent the fake companies that just buy up patents and sue everybody from existing.

See also: