main | nds compo site | tutorials

Language Mode: plain text | java | cpp | ruby | python | lolcode
1
class content:
2
''' 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
'''
83
''' 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
'''
89
''' 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
'''
94
''' 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
'''
102
''' contact:

collapse/expand
103

BotProof Image:
You must see the image for my email...
104
'''
105
''' WARNING:

collapse/expand
106

This code does not actually compile or run!
107
'''
108
class programs:
109
def test7zpwd(self):

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" or your_os == "mac" or your_os == "linux" or your_os == "unix":
134
return(test7zpwd.7z)
135
else:
136
#----Sorry, don't have a download for your OS----
137
return(None)
138
def genetic3D(self):

collapse/expand
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

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).
164
#----DOWNLOAD----
165
#----Needs Java 6!----
166
return(genetic3D.7z)
167
def l-portable(self):

collapse/expand
168
169
170
171
172
173
174
175
176

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
177
#----DOWNLOAD----
178
if your_os == "linux":
179
return(http://download.tuxfamily.org/lportable/installer.tar.bz2)
180
else:
181
#----Sorry, don't have a download for your OS----
182
return(None)
183
def matrix(self):

collapse/expand
184
185

A Java-based terminal programs that prints a Matrix background in
a virtual terminal (cmd.exe doesn't work, unfortunately).
186
#----DOWNLOAD----
187
#----Needs Java 6!----
188
return(ComplexMatrix.java)
189
def lowfat_manager(self):

collapse/expand
190
191
192
193

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
194
#----DOWNLOAD----
195
if your_os == "linux":
196
return(lfm.rb)
197
else:
198
#----Sorry, don't have a download for your OS----
199
return(None)
200
def countdown(self):

collapse/expand
201

A little bash script that counts down to a specific date.
202
#----DOWNLOAD----
203
if your_os == "linux" or your_os == "mac" or your_os == "unix":
204
return(countdown.sh)
205
else:
206
#----Sorry, don't have a download for your OS----
207
return(None)
208
def treebuilder(self):

collapse/expand
209
210

A simple OOP-based code generator for Java.  Make your classes and properties,
and export away!
211
#----DOWNLOAD----
212
#----Needs Java 6!----
213
return(TreeBuilder.jar)
214

collapse/expand
215
216


	
217
class games:
218
def mupen64_wiimote_plugin(self):

collapse/expand
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235

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
236
#----DOWNLOAD----
237
if your_os == "linux":
238
return(mupen64_wiimote_plugins.tar.bz2)
239
else:
240
#----Sorry, don't have a download for your OS----
241
return(None)
242
def l-echo(self):

collapse/expand
243
244
245
246
247

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

l-echo screenshot
248
#----DOWNLOAD----
249
if your_os == "nds" or your_os == "windows" or your_os == "mac" or your_os == "linux":
250
return(http://code.google.com/p/l-echo/)
251
else:
252
#----Sorry, don't have a download for your OS----
253
return(None)
254
def joules(self):

collapse/expand
255

A Java-based clone of the game Atomix for the Amiga.
256
#----DOWNLOAD----
257
#----Needs Java 6!----
258
return(http://sourceforge.net/projects/joules/)
259

collapse/expand
260
261


	
262

collapse/expand
263
264


265