main | nds compo site | tutorials

Language Mode: plain text | java | cpp | ruby | python | lolcode
1
class content
2
=begin about:

collapse/expand
3
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

{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)
82
=end
83
=begin COPYING:

collapse/expand
84
85
86
87

Affero GPL v3
This web page is under Affero GPL v3
GPL v3
ALL programs downloaded from this site are under  GPL v3
88
=end
89
=begin credits:

collapse/expand
90
91
92

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.
93
=end
94
=begin links:

collapse/expand
95
96
97
98
99
100

  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.
101
=end
102
=begin contact:

collapse/expand
103

BotProof Image:
You must see the image for my email...
104
=end
105
=begin WARNING:

collapse/expand
106

This code does not actually compile or run!
107
=end
108
class programs
109
def test7zpwd

collapse/expand
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

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.
132
#----DOWNLOAD----
133
if(your_os == "windows"
134
|| your_os == "mac"
135
|| your_os == "linux"
136
|| your_os == "unix")
137
return(test7zpwd.7z)
138
else
139
#----Sorry, don't have a download for your OS----
140
return(nil)
141
end
142
def genetic3D

collapse/expand
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167

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).
168
#----DOWNLOAD----
169
#----Needs Java 6!----
170
return(genetic3D.7z)
171
end
172
def l-portable

collapse/expand
173
174
175
176
177
178
179
180
181

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
182
#----DOWNLOAD----
183
if(your_os == "linux")
184
return(http://download.tuxfamily.org/lportable/installer.tar.bz2)
185
else
186
#----Sorry, don't have a download for your OS----
187
return(nil)
188
end
189
def matrix

collapse/expand
190
191

A Java-based terminal programs that prints a Matrix background in
a virtual terminal (cmd.exe doesn't work, unfortunately).
192
#----DOWNLOAD----
193
#----Needs Java 6!----
194
return(ComplexMatrix.java)
195
end
196
def lowfat_manager

collapse/expand
197
198
199
200

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
201
#----DOWNLOAD----
202
if(your_os == "linux")
203
return(lfm.rb)
204
else
205
#----Sorry, don't have a download for your OS----
206
return(nil)
207
end
208
def countdown

collapse/expand
209

A little bash script that counts down to a specific date.
210
#----DOWNLOAD----
211
if(your_os == "linux"
212
|| your_os == "mac"
213
|| your_os == "unix")
214
return(countdown.sh)
215
else
216
#----Sorry, don't have a download for your OS----
217
return(nil)
218
end
219
def treebuilder

collapse/expand
220
221

A simple OOP-based code generator for Java.  Make your classes and properties,
and export away!
222
#----DOWNLOAD----
223
#----Needs Java 6!----
224
return(TreeBuilder.jar)
225
end
226

collapse/expand
227
228


	
229
end
230
class games
231
def mupen64_wiimote_plugin

collapse/expand
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

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
249
#----DOWNLOAD----
250
if(your_os == "linux")
251
return(mupen64_wiimote_plugins.tar.bz2)
252
else
253
#----Sorry, don't have a download for your OS----
254
return(nil)
255
end
256
def l-echo

collapse/expand
257
258
259
260
261

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

l-echo screenshot
262
#----DOWNLOAD----
263
if(your_os == "nds"
264
|| your_os == "windows"
265
|| your_os == "mac"
266
|| your_os == "linux")
267
return(http://code.google.com/p/l-echo/)
268
else
269
#----Sorry, don't have a download for your OS----
270
return(nil)
271
end
272
def joules

collapse/expand
273

A Java-based clone of the game Atomix for the Amiga.
274
#----DOWNLOAD----
275
#----Needs Java 6!----
276
return(http://sourceforge.net/projects/joules/)
277
end
278

collapse/expand
279
280


	
281
end
282

collapse/expand
283
284


285
end
286