Android – Large File Transfer – Samsung Galaxy S3 SGS

This is one way transfer large files to android when other methods do not work:

  • Turn on Developer Mode and Debugging Tools
  • Install Android SDK on your computer
  • Plug in phone and open the command prompt and type:
  • More ADB info

    PATH-TO\android-sdk-windows\platform-tools\adb.exe push PATH-TO\ /mnt/sdcard/
  • This usually takes a second.  I would first try transferring a small file to make sure you have the correct path.

Note: The ‘/mnt/sdcard’ may be specific to my device.  If you can’t seem to find a writable folder do this:

PATH-TO\android-sdk-windows\platform-tools\adb.exe shell

then, using ls and cd commands, you can move around and try and find the path to your writable directory.


Hope this helps someone!

Teaching Kids to Code –

My friend Eric is a technology teacher at a school in the Richmond area and I were discussing the importance of teaching kids to code.  The website goes into it.

I thought I should write up a quick tutorial on ways for kids (or grown ups) to code while:

  • Having fun
  • Creating
  • Learning
  • Sharing their work
  • Building off of each others work

My tutorial utilizes two technologies:

jsfiddle : This web platform allows you to program in javascript and see your results.  You can share and build off existing code. : This javascript library allows you to cool stuff like: this, this, or this.  It is a powerful library that has great documentation.

So, here are my basic first instructions:


So, in this example, you can change the line of code:
to be:

Hit RUN, and you will get a red background.

Then, you can use the SHARE button and you can see options to use Twitter or just send a link without any code:


So, I think you could learn a whole lot from these two things combined.

Hope this helps!


MailChimp – Pass Email to Form

mail chimp logo

I wanted to use a basic email field and send the information to a mailchimp form.  I could not find the solution anywhere, so I decided to see if I could hack a solution.

When you go to MailChimp > For Your Website > Signup Form Link Code
You will get something like:, which will take you to something like:

If you look at the source on this page, you will see that the form elements are called: MERGE0, MERGE1…

On my form, the email field is MERGE0, so on my website, I was able to create a javascript link that will automatically fill in email by using this link:[email protected]

You can fill in more than one field by adding more merge fields in the url:[email protected];MERGE1=Daniel Folkes

Then, you can use this jquery to auto open a new window on enter key press:

            $("#ea").keypress(function (e) {
                if (e.which == 13) {
                    //[email protected]
                    var url = "//";
                    url += "&MERGE0=" + $("#ea").val(); // ea is my email input text box.
          , "mywindow", "status=1,toolbar=1,resizable=1,width=1000,height=600");

Current Phone Setup – Galaxy S III – Cyanogenmod

Android: Samsung Galaxy S III (SPH-L710)
Rom: Cyanogenmod 10.12 – Android 4.2.1
Best Features:

  • Being able to tether through USB and Wifi for free
  • Using the volume keys to skip tracks
  • Getting all the up-to-date features of android without worrying about Sprint releasing it for my phone
  • Other new android features

Moderating Comments on a Freehostia Chocolate Account (Free)

The problem: Freehostia Free Accounts block outside connections.  This means that Akismet can’t access it’s servers and you can’t have spam checking.  So, all of your comments are spam spam spam!

I tried to add a captcha, but they got around that.  I tried to add Disqus using the plugin, but that failed to install because of the account’s limitations.

But, I was able to add moderated comments to my freehostia site by manually installing Disqus.  This is very necessary because otherwise you get hit with a bunch of spammers.

Here is how you manually install Disqus on WordPress.

  1. Create New Disqus Account 
  2. Go to your dashboard
  3. Click on your site
  4. Go to Settings
  5. And then click Install
  6. Select Universal Code
  7. Copy that code
  8. In /wp-content/themes/THEMENAME/single.php Replace:
    <?php comments_template( '', true ); ?>


    echo '	
        But you must remember to ESCAPE the 
        single quotes with backslashes example: \'
  9. Save, Upload, then go to one of your posts. You should see Disqus loading at the bottom.
  10. Remember to setup your Disqus the way you want it. It’s a little restrictive out of the box. You can even add Akismet to Disqus in their admin interface.

Run WordPress and Ruby on Rails using Apache

  1. Install a LAMP server with apache 2.
  2. Install Rails
  3. Install and Setup WordPress
  4. You should see wordpress here:
  5. Then, add this to your apache config’s Virtualhost section:
    1. ProxyPass /fakerubypath
  6. Now, start your rails server
    1. ./script/rails server
  7. You should now be able to see your ruby site on:

I set mine up: wordpress and rails


Short Domain Name Finder

This is a short url finder I created.
It checks to see if the domain is available remembers.

Short Domain Name Finder

There is a python script in the background that populates a mysql database which displays it with php.

Installing Diaspora on Ubuntu on VirtualBox

Installing Diaspora on Ubuntu on VirtualBox

I wrote up a little howto on the Diaspora git hub:

Sending Email with PHP, Gmail or Google Apps, Mail, and PEAR on Ubuntu

First Install Pear, Mail, Mail Mime, Net SMTP. Restart Apache:

sudo apt-get install php-pear
sudo pear install mail
sudo pear install mail_mime
sudo pear install Net_SMTP
sudo /etc/init.d/apache2 restart

Here is the PHP code I used to send an email:

try {
	require_once "Mail.php";
	$from = "[email protected]";
	$to = "{$email}";
	$subject = "Hi!";
	$body = "Hi,\n\nHow are you?";
	$host = "ssl://";
	$port = "465";
	$username = "[email protected]"; //This can also be a Google Apps account
	$password = "PASSWORD";
	$headers = array ('From' => $from,
	  'To' => $to,
	  'Subject' => $subject);
	$smtp = Mail::factory('smtp',
	  array ('host' => $host,
		'port' => $port,
		'auth' => true,
		'username' => $username,
		'password' => $password));
	$mail = $smtp->send($to, $headers, $body);
	if (PEAR::isError($mail)) {
	  echo("<p>" . $mail->getMessage() . "</p>");
	 } else {
	  echo("<p>Message successfully sent!</p>");
} catch (Exception $e) {
	echo 'Caught exception: ',  $e->getMessage(), "\n";

Converting a Magnet Link into a Torrent

UPDATE – 2012-04-30 – User Faless on GitHub has added a good bit of functionality. Check it out.

For some reason, my version of the rtorrent client on ubuntu does not open magnet files. So, I wanted to see if there was a way to create torrent files from magnet files. I couldn’t find a good example, so I wrote my own.

This will convert a magnet link into a .torrent file:

First, make sure your system has Python and the Python Library:

sudo apt-get install python-libtorrent

Then, you can run the following code by calling this command:



Created on Apr 19, 2012
@author: dan
if __name__ == '__main__':
    import libtorrent as lt
    import time
    TorrentFilePath = "/home/dan/torrentfiles/" + str(time.time()) + "/"
    TorrentFilePath2 = "/home/dan/torrentfiles/" + str(time.time()) + "/" + str(time.time()) + ".torrent"
    ses = lt.session()
    #ses.listen_on(6881, 6891)
    params = {
        'save_path': TorrentFilePath,
        'duplicate_is_error': True}
    link = "magnet:?xt=urn:btih:599e3fb0433505f27d35efbe398225869a2a89a9&dn=ubuntu-10.04.4-server-i386.iso&"
    handle = lt.add_magnet_uri(ses, link, params)
#    ses.start_dht()
    print 'saving torrent file here : ' + TorrentFilePath2 + " ..."
    while (not handle.has_metadata()):
    torinfo = handle.get_torrent_info()
    fs = lt.file_storage()
    for file in torinfo.files():
    torfile = lt.create_torrent(fs)
    f = open(TorrentFilePath2 + "torrentfile.torrent", "wb")
    print 'saved and closing...'
#Uncomment to Download the Torrent:
#    print 'starting torrent download...'
#    while (handle.status().state != lt.torrent_status.seeding):
#        s = handle.status()
#        time.sleep(55)
#        print 'downloading...'

This will create a folder inside of ‘/home/dan/torrentfiles/’ with a structure like:


I added this to GitHub if you want to Fork it.