main | nds compo site | tutorials

Language Mode: plain text | java | cpp | ruby | python | lolcode
1
public class content
2
{
3
/* about:

collapse/expand
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

{CODE}
By Jeff Chien

September 19, 2009: School is back.  Ironically, the sheer boredom of the routine
might increase my code productivity...

...as demonstrated by this client I wrote.  I joined a side project that required cracking
a 7z archive, and wrote an optimized distributed cracker rather than rarcrack, which
abuses popen().

We ended up figuring that traversing billions upon billions of passwords
wasn't worth something that could be replicated in a month or two, so it's scrap code now. 
The 7z/LZMA backend was taken from 7z itself, but I sloppily hacked some code in, because the
C code doesn't do encryption, and the C++ code is too damn complex.  It spits out a false
positive every hundred lines or so.

You can get it here.

In other news, Greg Klein, the former president of the Java Club, has recently sent
up a weather balloon to outer space.  No, it's not the MIT project (although he has
complained that they're getting more attention, and that his balloon would now seem like an
imitation of the MIT project).  You can read more about it here.

The RSS feed for this site (even though it's barely updated) is being
fiddled around with because I've been reformatting recently; I installed Windows 7 RTM, then
reinstalled Windows 7 because I realized that I was using 64-bit.

--------------------------------------------------------------------------------------

July 31, 2009: Oh wow, I really haven't updated in a long time.  I've been up to my neck
in work on a new project several friends and I are doing, so I haven't had the time
to update anything.  We aren't ready to reveal our project, so check back here later.

l-echo, as you all may know, had been cancelled sinced March, because I realized that I was going
about it the wrong way.  Instead, I probably should be making a weird physics engine that matched
the visuals, so falling and jumping would be far easier to implement.

I have to be honest, though, the reason for this update is because I put up a page for this
NDS homebrew competition I'm entering.  I figured, why not enter a contest with n-echo, it's still
a pretty good homebrew despite it's discontinued state.  The competition details are here
if you want to vote for me.

January 19, 2009: I realized that I can teach a lot about NDS homebrew, so
I written 2 intros into coding for Nintendo's famous handheld.  I'll probably
post more soon.

January 18, 2009: Kicking off the new year with a new l-echo release (0.4.2).
And, as a late Whatever-your-holiday-is Present, I present to you j-echo, in
applet form.  (Will load JOGL from other sources)

Dec 29, 2008: Two new AMES tutorial are up (actually, more like 1.5).
The OpenAL tutorial is cancelled (it was buggy anyways; OpenAL would
frequently just eat up all my buffers, and suddenly stop).
Ruby tutorials...are getting there...

Speaking of Ruby tutorials, or programming tutorials in general,
I heartily recommend anyone looking for example code to go to a new
site called LiteratePrograms. It's a programming wiki, but with 
some extra features thrown in to make it really awesome, such as snippet
referencing and downloading all the code in an archive.
I already contributed a page here: 99 Beers in Ruby

On a different note, I made some improvements to the site, such as automatic
anchors, block links, and a nav bar.

Dec 12, 2008: Added an AMES intro tutorial.
Also added a genetic algorithms program, genetic3D.
genetic3D screenshot

Source Code of {CODE}:
index.php - this page
highlighters.php - does the syntax highlighting
xml_parser.php - does the parsing, calls highlighters.php to output
site_src.php - the downloading script
code-content.xml - holds the actual content
tutorials.xml - holds the actual content
code.css - CSS classes for syntax highlighting
css.css - CSS classes for text (used in JShell)
83
*/
84
/* COPYING:

collapse/expand
85
86
87
88

Affero GPL v3
This web page is under Affero GPL v3
GPL v3
ALL programs downloaded from this site are under  GPL v3
89
*/
90
/* credits:

collapse/expand
91
92
93

SyntaxHighlighter's homepage is here (it's used for code snippets,
not this website in general).
Icons and trademarks are owned by their respective owners.
94
*/
95
/* links:

collapse/expand
96
97
98
99
100
101

  1. Greg Klein - Weird guy that I know
  2. MV Java Club - A club that I'm in (yes, I'm in high school).
  3. Open ActionScript - EXCELLENT site on FAMES development; if only it was AS3 and AMES compatible...
  4. LiteratePrograms - A site with excellent code samples in a literate programming fashion; kinda like what I do, but with jumping around the code.
102
*/
103
/* contact:

collapse/expand
104

BotProof Image:
You must see the image for my email...
105
*/
106
/* WARNING:

collapse/expand
107

This code does not actually compile or run!
108
*/
109
public class programs
110
{
111
public program test7zpwd()
112
{

collapse/expand
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134

Code for a distributed 7z password cracker client.

It was originally intended to be a BOINC-based cracker,
but BOINC gave us more grief than benefits, so we wrote our own server backend.
I don't have the code for it, but the specs were such:

There would be a SQL DB holding the password work units.  Each work unit is a
series of passwords.  The columns of the database were the work unit ID, starting password
for the series, and the number of negatives.  Once each unit had a sufficient
amount of negatives (because someone could be spamming false negatives), a new
DB with the next series of work unit replaces the old one.

get_work would be a php script that spits out a random work unit (to distribute
false results), in the format "[id]|[starting pwd]|[number of passwords to traverse]"

report_result is another php script to report the, um, results.  Parameters:
  • id - Work Unit ID
  • success - Was there a good password in the range?
  • password - Report the good password if successful
Note that the LZMA backend for this is very bad. Replace T7ZExtract() in test7zpwd_lzma.c if you don't want false positives.
135
----DOWNLOAD----
136
if(your_os == "windows"
137
|| your_os == "mac"
138
|| your_os == "linux"
139
|| your_os == "unix")
140
return(test7zpwd.7z);
141
else
142
----Sorry, don't have a download for your OS----
143
return(null);
144
}
145
public program genetic3D()
146
{

collapse/expand
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171

Genetic algorithms have been a buzz topic recently, so	
I decided to take a shot at it.  genetic3D takes an image of a 3D scene
and attempts to construct a similar scene with genetic algorithms.

I ran two instances ovenight, and here are the screenshots:
genetic3D screenshot
genetic3D screenshot
genetic3D screenshot
genetic3D screenshot
genetic3D screenshot

In the end, though, the instance on the right ran out of memory and died.
(Remember, kids, once in a while, you should clear your logs)
Here's the end result for the instance on the left:
genetic3D screenshot

Most of the parameters (maximum of the coordinates, number of vertices
and target image) are hard-coded in right now, but it's conceivable
to put the bottom right corner of the frame to better use by having it set
some variables.  Also, to narrow down the search, letting the user set control
points would be a future feature.

In addition to Java 6, this program will require JOGL and JAI.
And sorry, the download is just source code (you'll have some fun with classpath
if I put up a binary anyways).
172
----DOWNLOAD----
173
----Needs Java 6!----
174
return(genetic3D.7z);
175
}
176
public program l-portable()
177
{

collapse/expand
178
179
180
181
182
183
184
185
186

l-portable logo
l-portable is a framework for (Linux) programs to run off of removable media,
like PortableApps for Windows.  It is very extensible, but currently
requires GNOME to run.  Thanks to the awesome guys at TuxFamily, I've been
able to find a host!  Click the link below to download the installer.



Source Code Here
187
----DOWNLOAD----
188
if(your_os == "linux")
189
return(http://download.tuxfamily.org/lportable/installer.tar.bz2);
190
else
191
----Sorry, don't have a download for your OS----
192
return(null);
193
}
194
public program matrix()
195
{

collapse/expand
196
197

A Java-based terminal programs that prints a Matrix background in
a virtual terminal (cmd.exe doesn't work, unfortunately).
198
----DOWNLOAD----
199
----Needs Java 6!----
200
return(ComplexMatrix.java);
201
}
202
public program lowfat_manager()
203
{

collapse/expand
204
205
206
207

A little Ruby script that intergrates F-Spot (Ubuntu's default photo manager)
with Lowfat, a 3D photo display/eye-candy application.

lowfat manager screenshot
208
----DOWNLOAD----
209
if(your_os == "linux")
210
return(lfm.rb);
211
else
212
----Sorry, don't have a download for your OS----
213
return(null);
214
}
215
public program countdown()
216
{

collapse/expand
217

A little bash script that counts down to a specific date.
218
----DOWNLOAD----
219
if(your_os == "linux"
220
|| your_os == "mac"
221
|| your_os == "unix")
222
return(countdown.sh);
223
else
224
----Sorry, don't have a download for your OS----
225
return(null);
226
}
227
public program treebuilder()
228
{

collapse/expand
229
230

A simple OOP-based code generator for Java.  Make your classes and properties,
and export away!
231
----DOWNLOAD----
232
----Needs Java 6!----
233
return(TreeBuilder.jar);
234
}
235

collapse/expand
236
237


	
238
}
239
public class games
240
{
241
public program mupen64_wiimote_plugin()
242
{

collapse/expand
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259

Plugins for Mupen64plus (deb package here) to use a Wii remote.
It's game specific, though, and it only has schemes for Ocarina of Time 
(with controls similar to Twilight Princess), Mario Kart 64 (similar to Mario
Kart Wii controls), and Star Fox 64.

To install:
  1. Install Mupen64plus.
  2. Setup wiiuse (need to install from source, sorry: here).
  3. Move all the .so files into the plugins/ folder (in /usr/share/mupen64plus/plugins/ for the Debian package).
  4. Select the correct one in the "Configure" dialog.
  5. When you start up, there should be a black screen for a few seconds, and that's when you press 1 + 2 on your Wiimote (or Wiimotes in Mario Kart 64). If your Wiimote has connected, the one of its LEDs should come on. If not, restart the emulation and try again.
  6. If there is no black screen, then you did something wrong.
Source Code Here
260
----DOWNLOAD----
261
if(your_os == "linux")
262
return(mupen64_wiimote_plugins.tar.bz2);
263
else
264
----Sorry, don't have a download for your OS----
265
return(null);
266
}
267
public program l-echo()
268
{

collapse/expand
269
270
271
272
273

A free and open source clone of the SCEJ game Echochrome
(Mugen Kairou in Japan) (PSP/PS3).

l-echo screenshot
274
----DOWNLOAD----
275
if(your_os == "nds"
276
|| your_os == "windows"
277
|| your_os == "mac"
278
|| your_os == "linux")
279
return(http://code.google.com/p/l-echo/);
280
else
281
----Sorry, don't have a download for your OS----
282
return(null);
283
}
284
public program joules()
285
{

collapse/expand
286

A Java-based clone of the game Atomix for the Amiga.
287
----DOWNLOAD----
288
----Needs Java 6!----
289
return(http://sourceforge.net/projects/joules/);
290
}
291

collapse/expand
292
293


	
294
}
295

collapse/expand
296
297


298
}
299