Mixed GUI/Command line parameters processing
2
Well, ruby is actually so flexible that there is no real need to implement the goode olde signals & slots metaphor. But it serves nicely as demonstration of ruby properties, so here we go.
2
Command Line Calculato
2
KillProc will do a search of all the current processes and kill all that
match the name given. If the process name is misspelled, KillProc would
kill itself, based on the match. The 'find /v /i "KillProc"' part of the
search prevents KillProc from killing the CMD window it is running in.
Requires NT Resourcekit
match the name given. If the process name is misspelled, KillProc would
kill itself, based on the match. The 'find /v /i "KillProc"' part of the
search prevents KillProc from killing the CMD window it is running in.
Requires NT Resourcekit
4
Change wins settings for all nics
4
Builds a batch file to create hidden shares for a bunch of sub-directories (eg, User shares)
4
start remote admin connection from command line
5
This class intended to collect TODO comments from java/c++/etc source files.
Example:
protected readFileData (String path) throws IOException {
// TODO: add try...catch block for IOException
InputStream is = new FileInputStream(path);
...
}
See also DirectoryScanner class.
Example:
protected readFileData (String path) throws IOException {
// TODO: add try...catch block for IOException
InputStream is = new FileInputStream(path);
...
}
See also DirectoryScanner class.
5
This snippet illustrates following:
1. Using http request to get the data
2. Parsing RSS feeds
3. Sending email
1. Using http request to get the data
2. Parsing RSS feeds
3. Sending email
5
I've found it kind of complicated to strip newline chars from a file with just the commandline. This tiny piece of code does just that.
I've found it especially useful when extracting tabulated data from a grabbed site where each cell is on a different html line. This way I can pre-filter the html, remove the newlines, and insert them again at register boundaries (row end in this case), so that with just a couple more replacement from within a regex enabled text editor I can copy&paste it directly to a database.
I've found it especially useful when extracting tabulated data from a grabbed site where each cell is on a different html line. This way I can pre-filter the html, remove the newlines, and insert them again at register boundaries (row end in this case), so that with just a couple more replacement from within a regex enabled text editor I can copy&paste it directly to a database.
5
I'm in the process of writing test fixtures for our rails site. A lot of my tests require authentication, so I've had to port our permissions system into a fixture. Rather than type out all of the information for the fixture, I decided to create a nested loop that will take care of this for me.
There's probably a rake task for this, but I wasn't able to find it, so I came up with my own solution. You'll have to do a little cleanup when it's done, however some slight mods to this loop could even eliminate that.
There's probably a rake task for this, but I wasn't able to find it, so I came up with my own solution. You'll have to do a little cleanup when it's done, however some slight mods to this loop could even eliminate that.









