Best ninja app you've made?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

32 Replies - 6060 Views - Last Post: 31 October 2012 - 03:49 AM

#16 Creecher  Icon User is offline

  • I don't care
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,049
  • Joined: 06-March 10

Re: Best ninja app you've made?

Posted 16 March 2011 - 04:27 PM

Well.. I created my first program in C++, which was a launcher for programs that I use frequently.

Now, I've moved to VB and have a GUI and everything. Feels good man :)

Original C++ Version:
#include <cstdlib>
#include <iostream>
#include <windows.h> 
#include <winable.h>
#include <conio.h>
using namespace std;

                int main()
                     {            
                     system("color 0a"); 
                     SetConsoleTitle( "Application Launcher" );
                     
                     
                                                      { 
                                              char choice;
                     for (;;)/>{
         do {
             cout << " лллллл лллллл   лллллл   лллллл   лллллл  лл   лл " << endl;
             cout << " лл     лл   л   лл       лл       лл      лл   лл  " << endl;
             cout << " лл     лллллл   лллллл   лллллл   лл      ллллллл" << endl;
             cout << " лл     лл   л   лл       лл       лл      лл   лл  " << endl;
             cout << " лллллл лл   лл  лллллл   лллллл   лллллл  лл   лл  " << endl;
             
             cout<<"\n\nWhat program do you want to launch?\n";
             cout<<"1 - Opera \n";
             cout<<"2 - Firefox\n"; 
             cout<<"3 - Notepad++\n";
             cout<<"4 - Dev-C++\n"; 
             cout<<"5 - 7-zip\n";
             cout<<"6 - Filezilla\n";
             cout<<"7 - Pidgin\n";
             cout<<"8 - ResHacker\n";
             cout<<"9 - Photoshop CS4\n";
             cout<<"Press Q to quit";
             cout<<"\n\n"; 
             cin>>choice;
                         } while ( choice < '1' || choice > '9' && choice != 'q');
                         if (choice == 'q') break;
                            switch (choice) {
                                   case '1':
                                        cout<<"Launching Opera...\n";
                                        ShellExecute( NULL, NULL, "/Apps/operausb1063/opera.exe", NULL, NULL, SW_SHOW );
                                        system("pause");
                                        system("cls"); 
                                        break;
                                   case '2':
                                        cout<<"Launching Firefox...\n";
                                        ShellExecute( NULL, NULL, "/Apps/FirefoxPortable/FirefoxPortable.exe", NULL, NULL, SW_SHOW );  
                                        system("pause");
                                        system("cls");
                                        break;
                                   case '3':
                                        cout<<"Launching Notepad++...\n";
                                        ShellExecute( NULL, NULL, "/Apps/Notepad++/unicode/notepad++.exe", NULL, NULL, SW_SHOW );
                                        system("pause");
                                        system("cls");
                                        break;
                                   case '4':
                                        cout<<"Launching Dev-C++...\n";
                                        ShellExecute( NULL, NULL, "/Dev-Cpp/devcpp.exe", NULL, NULL, SW_SHOW );
                                        system("pause");
                                        system("cls");
                                        break;
                                   case '5':
                                        cout<<"Launching 7-Zip...\n";
                                        ShellExecute( NULL, NULL, "/Apps/x86/7-Zip/7zFM.exe", NULL, NULL, SW_SHOW );
                                        system("pause");
                                        system("cls");
                                        break;
                                   case '6':
                                        cout<<"Launching Filezilla...\n";
                                        ShellExecute( NULL, NULL, "/Apps/FileZilla/filezilla.exe", NULL, NULL, SW_SHOW );
                                        system("pause");
                                        system("cls");
                                        break;
                                   case '7':
                                        cout<<"Launching Pidgin\n";
                                        ShellExecute( NULL, NULL, "/Apps/Pidgin/X-Pidgin.exe", NULL, NULL, SW_SHOW );
                                        system("pause");
                                        system("cls");
                                        break;
                                   case '8':
                                        cout<<"Launching ResHacker...\n";
                                        ShellExecute( NULL, NULL, "/Apps/ResHack/ResHacker.exe", NULL, NULL, SW_SHOW );
                                        system("pause");
                                        system("cls");
                                        break;
                                   case '9':
                                        cout<<"Launching Photoshop CS4...\n";
                                        ShellExecute( NULL, NULL, "/Apps/Photoshop/PhotoshopPortable/PhotoshopPortable.exe", NULL, NULL, SW_SHOW);
                                        system("pause");
                                        system("cls");
                                        break;
                                   default:
                                        cout<<"That is not an option";
                                        system("pause");
                                        system("cls");
} 

}                         
                   
                   
                       }
                                             

                                        return 0;
}




Current VB version:
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If (CheckBox1.Checked = True) Then
            Shell("/Apps/FirefoxPortable/FirefoxPortable.exe")
        End If
        If (CheckBox2.Checked = True) Then
            Shell("/Apps/Notepad++/unicode/notepad++.exe")
        End If
        If (CheckBox3.Checked = True) Then
            Shell("/Apps/FileZilla/filezilla.exe")
        End If
        If (CheckBox4.Checked = True) Then
            Shell("/Apps/uTorrentPortable/uTorrentPortable.exe")
        End If
        If (CheckBox5.Checked = True) Then
            Shell("/Apps/Photoshop/PhotoshopPortable/PhotoshopPortable.exe")
        End If
        If (CheckBox6.Checked = True) Then
            Shell("/Apps/Pidgin/X-Pidgin.exe")
        End If
        If (CheckBox7.Checked = True) Then
            Shell("/Apps/bb4win_mod/blackbox.exe")
        End If
        If (CheckBox8.Checked = True) Then
            Shell("/Dev-Cpp/devcpp.exe")
        End If
        If (CheckBox9.Checked = True) Then
            Shell("/Apps/Chrome/ChromeLoader.exe")
        End If
        If (CheckBox10.Checked = True) Then
            Shell("/Apps/7-Zip/x86/7zFM.exe")
        End If
        If (CheckBox11.Checked = True) Then
            Shell("/Apps/operausb1063/opera.exe")
        End If
        If (CheckBox12.Checked = True) Then
            Shell("/Apps/Adobe DreamweaverCS4/Portable Adobe Dreamweaver CS4 10 Final/DreamweaverPortable.exe")
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Application.Exit()
    End Sub
End Class


Was This Post Helpful? 0
  • +
  • -

#17 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9091
  • View blog
  • Posts: 34,144
  • Joined: 12-June 08

Re: Best ninja app you've made?

Posted 16 March 2011 - 05:25 PM

Kudos everyone! Keep up the good niche programming!
Was This Post Helpful? 0
  • +
  • -

#18 blank_program  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 11
  • View blog
  • Posts: 282
  • Joined: 22-July 09

Re: Best ninja app you've made?

Posted 23 March 2011 - 02:49 PM

I got tired of trying to go to eh middle of a large (800+ line) configuration file to change two values for the fullscreen resolution so I made a small program in C# to do it for me and use the current resolution of whatever display device I am connected to. I even added a small .ini settings file. I am sure the code is horrible since I wrote it long ago but no need to really rewrite it.

I also wrote some programs for my TI-83 Plus to solve statistics equations for me for use on exams.
Was This Post Helpful? 0
  • +
  • -

#19 Choscura  Icon User is offline

  • D.I.C Lover


Reputation: 461
  • View blog
  • Posts: 2,222
  • Joined: 18-October 08

Re: Best ninja app you've made?

Posted 26 March 2011 - 03:00 AM

I've got a small text processing shell that lets me track the frequency and position of every word in the text, some basic regex to group similar words together (looks for different prefixes and suffixes, etc), and do basic edits before saving the file. Nothing fancy, just textbox on top for the file, richtextbox on the left to show the source and richtextbox on the right to show the data.
Was This Post Helpful? 0
  • +
  • -

#20 TomJoad  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 54
  • Joined: 01-December 10

Re: Best ninja app you've made?

Posted 12 April 2011 - 01:27 PM

I made a simple interest calculator that people at work use all the time. I also made a GUI for my computer-TV (like the application launcher above).

However, what I am most proud of was when I screwed up the design of the simple interest calc., above, and didn't think through how I would save the data people inputed so they can load it back up. So I created a temporary function and for loop inside of it, which then outputted the needed source code to get the information to save from the 200+ input boxes to a text file. I then just copied the text file contents into the correct function, and, like magic, I had a save feature! I did this instead of reworking the program. In the future, I'll know the better way, but I really didn't want rework the entire program to add one feature.

I think I'm proud of it because I found it humerus to write code to output code. Nonetheless, it probably saved me hours of work.

This post has been edited by TomJoad: 12 April 2011 - 01:31 PM

Was This Post Helpful? 0
  • +
  • -

#21 Curtis Rutland  Icon User is online

  • (╯А□А)╯︵ (~ .o.)~
  • member icon


Reputation: 4468
  • View blog
  • Posts: 7,780
  • Joined: 08-June 10

Re: Best ninja app you've made?

Posted 12 April 2011 - 01:59 PM

Quote

I think I'm proud of it because I found it humerus to write code to output code. Nonetheless, it probably saved me hours of work.


Speaking of writing code to write code...

I've been working on some code-gen stuff. We use XSD.EXE to create classes from some XSD schemas we have. Of course, these classes by themselves aren't good enough, but we don't want to have to edit the 10,000 line class file it outputs by hand either. So I've got some string parsing code that will go through the output, clean up what we don't want, and add what we do.

By the way, that's one thing I love about C#: partial classes. The XSD.EXE didn't give it everything we wanted it to have, so instead of having to go into each class and edit it, we can basically redeclare the class and add what we want, like a base class or an interface implementation, a method or some properties.
Was This Post Helpful? 0
  • +
  • -

#22 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2256
  • View blog
  • Posts: 9,444
  • Joined: 29-May 08

Re: Best ninja app you've made?

Posted 05 May 2011 - 09:37 PM

I've written a Nemerle Macro that output time profile a section of your code, to the trace log.

By simply prefixing that section with TimeThis "Section Title" { code } (The braces sometimes can be optional.)

How ninja is that?
Was This Post Helpful? 0
  • +
  • -

#23 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9091
  • View blog
  • Posts: 34,144
  • Joined: 12-June 08

Re: Best ninja app you've made?

Posted 05 May 2011 - 09:57 PM

I don't know if I mentioned it, but I wrote a slick little app using the GZIP libraries to automate compression of the 260mb SQL logs generated every fifteen minutes at work. It crunched those puppies down to about 15mb. My boss about did a back flip.
Was This Post Helpful? 0
  • +
  • -

#24 trevster344  Icon User is offline

  • The Peasant
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,505
  • Joined: 16-March 11

Re: Best ninja app you've made?

Posted 07 February 2012 - 12:40 AM

Most useful app I could create(that my dad hadn't already created before me) was a program to store my cd keys for all my video games(quite the gamer). I got tired of searching only to find that the cd key I once had was not where I had left it. It operated pretty simply, you press any key you assign it to and while you are installing, or whatever it records the key presses(like a key logger), and saved them to a SQL database I had set up on a server elsewhere. Helped me out a lot!
Was This Post Helpful? 0
  • +
  • -

#25 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Best ninja app you've made?

Posted 07 February 2012 - 05:26 PM

I was making a game in lua in which the idea was to write fun little programs to solve the problem but after writing the file dialogue(I was using a game engine with no GUI, love2d) I ended up turning it into a random directory/file selector to pick movies off my hard drive...it ended up devolving into a 15 line console application using completely different libraries :/

I also wrote a small script for converting C header files to something LuaJIT could read(for it's FFI) but ended up never using it(it simply runs GCC's pre-proc then removes any remaining pre-proc directives) :/

edit:
wow, I just participated in a necropost...

This post has been edited by ishkabible: 07 February 2012 - 05:41 PM

Was This Post Helpful? 0
  • +
  • -

#26 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2256
  • View blog
  • Posts: 9,444
  • Joined: 29-May 08

Re: Best ninja app you've made?

Posted 07 February 2012 - 08:50 PM

I'd have to put up there as one of my best ninja apps;-
TTF (Tiny Testing Framework)
Note: It requires .net4.0 (client profile)

Especially since it is under 50 LoC, two seperate NuGet packages of 8Kb each and only adds 25Kb in total to your process.

Example
Spoiler

Follow on GitHub

This post has been edited by AdamSpeight2008: 07 February 2012 - 08:59 PM

Was This Post Helpful? 0
  • +
  • -

#27 Mylo  Icon User is offline

  • Knows all, except most.

Reputation: 265
  • View blog
  • Posts: 747
  • Joined: 11-October 11

Re: Best ninja app you've made?

Posted 08 February 2012 - 02:18 AM

What is a ninja app?
Was This Post Helpful? 0
  • +
  • -

#28 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9091
  • View blog
  • Posts: 34,144
  • Joined: 12-June 08

Re: Best ninja app you've made?

Posted 08 February 2012 - 07:50 AM

Small and efficient apps that serve a direct and narrow purpose.
Was This Post Helpful? 0
  • +
  • -

#29 depricated  Icon User is online

  • DLN-000

Reputation: 673
  • View blog
  • Posts: 2,323
  • Joined: 13-September 08

Re: Best ninja app you've made?

Posted 30 October 2012 - 08:48 AM

I wrote a program that would work with a linux script on my home server to retrieve movies and load them automatically in VLC.

My family is computarded - I wrote the script so all they would have to do is pick the title by number and it would load it to their harddrive, but they couldn't understand how to launch it from there and kept asking me to do it for them - so this automated it. Now they just have to pick the movie from the select box and hit play.
Was This Post Helpful? 0
  • +
  • -

#30 MathewS  Icon User is offline

  • D.I.C Regular

Reputation: 18
  • View blog
  • Posts: 343
  • Joined: 14-May 02

Re: Best ninja app you've made?

Posted 30 October 2012 - 09:23 AM

My latest 'ninja' app was so that I could automate a bunch of tests.

The problem I had was that I had many different scientific tests that needed to be run, the only problem was that these tests could take anywhere from 1 min to several hours. And sometimes I would want to only run 1 or 2 or possible several if I didn't want to use the machine.

It basically took in an application (console based although could be any), and a parameter list.
Add how ever many you want, then how many you want to run and the CPU priority and hit start.
Hard to explain things so here's a screenshot.
Posted Image
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3