Search found 1062 matches

by darkspork
Mon Jun 17, 2013 6:16 pm UTC
Forum: Logic Puzzles
Topic: "Elvish" cipher
Replies: 0
Views: 2925

"Elvish" cipher

IMG_0114.JPG I came up with this over a long time. A friend of mine suggested we should use it to send secret messages to each other so that "the NSA can't track it." I severely, severely doubt it's even remotely secure as a cryptographic protocol, and really only merits itself in its typ...
by darkspork
Tue Nov 27, 2012 10:13 pm UTC
Forum: Coding
Topic: An iOS-friendly version of JSFiddle?
Replies: 0
Views: 1502

An iOS-friendly version of JSFiddle?

I was playing around with JSFiddle on the iPad today. For a code editor on a tablet, it's pretty fantastic. I was upset to find it doesn't work offline as a web app when saved to the Home screen. Anybody know a good [is can be free plz?] code editor for this thing? The absolute best would be if JSFi...
by darkspork
Sat Sep 22, 2012 9:43 pm UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

https://github.com/charredUtensil/charredutensil.github.com/blob/master/scriqqle/game.css

I was trying to explain what Cascading Style Sheets were.
by darkspork
Mon Sep 17, 2012 6:31 pm UTC
Forum: Coding
Topic: Let's speed up ActiveRecord!
Replies: 1
Views: 1294

Let's speed up ActiveRecord!

So let's say I have a class Foo which has_one Bar class Foo < ActiveRecord::Base has_one :bar ... end class Bar < ActiveRecord::Base ... end and for whatever reason, I need to loop through all the Foos and print values from their Bar Foo.all.each{|foo| puts foo.bar.thing} Naturally, this is going to...
by darkspork
Sat Sep 15, 2012 7:24 pm UTC
Forum: The Help Desk
Topic: Make Apache use Ruby like PHP without Rails?
Replies: 3
Views: 2194

Re: Make Apache use Ruby like PHP without Rails?

Welp, mod_rewrite did the trick. Purely out of curiosity, I managed to get it to parse and serve .scss and .sass for missing .css too (Nesting declarations in css!? What!?) I might have to take a look at the Content Negotiation stuff anyway, though. I think that's what's been screwing up something I...
by darkspork
Mon Sep 10, 2012 3:24 pm UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

require "bundler/capistrano"


ok then...
by darkspork
Mon Sep 10, 2012 2:59 pm UTC
Forum: The Help Desk
Topic: Make Apache use Ruby like PHP without Rails?
Replies: 3
Views: 2194

Make Apache use Ruby like PHP without Rails?

Hey guys. I'm trying to get my Apache install to automatically execute .erb files when they're requested, just like how it automatically executes anything with the extension .php when they're requested. This is working. However, is it possible to ALSO have Apache check these for missing files withou...
by darkspork
Mon Jul 30, 2012 3:47 am UTC
Forum: Forum Games
Topic: Can you produce [X] in less than 15 seconds?
Replies: 7692
Views: 742041

Re: Can you produce [X] in less than 15 seconds?

Certainly, but I doubt I could brew it in that time.

How about a monocle?
by darkspork
Sun Jul 29, 2012 7:57 pm UTC
Forum: Coding
Topic: Rails: Send a file and render a page (or redirect)
Replies: 4
Views: 6014

Re: Rails: Send a file and render a page (or redirect)

Doesn't the page require auth'n in the first place? how is it different from iframes? You can still generate the data in core and send using a script, just check a session variable or nonce prior. A redirect might interrupt an iframe's downloading, while popping open a new window ensures that won't...
by darkspork
Sat Jul 28, 2012 4:35 am UTC
Forum: Coding
Topic: Rails: Send a file and render a page (or redirect)
Replies: 4
Views: 6014

Re: Rails: Send a file and render a page (or redirect)

Once the content headers are sent to download a file, you can't escape that to render a web page or redirect. What you can do is have a script open another window/tab to download the file, while the current page renders/redirects. I suppose that solves the download+redirect problem a bit more elega...
by darkspork
Fri Jul 27, 2012 9:58 pm UTC
Forum: Coding
Topic: Rails: Send a file and render a page (or redirect)
Replies: 4
Views: 6014

Rails: Send a file and render a page (or redirect)

Hello again everyone. I come with yet another amusing problem. I just finished writing together yet another convoluted system to allow a Rails app to send a file and render a page or redirect. This is about the fourth time I've had to make a site do this, and each time I do, it needs to be written a...
by darkspork
Tue Jul 17, 2012 3:48 am UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

2F2NX

From Steam's wonderful not-quite-two-factor-authentication.

Google's is very good and I strongly urge everyone use it.
by darkspork
Fri Jun 15, 2012 5:49 am UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

[/quote]
by darkspork
Fri Jun 15, 2012 5:47 am UTC
Forum: School
Topic: Awesome Teacher Quotes
Replies: 1764
Views: 393340

Re: Awesome Teacher Quotes

The greatest physics professor I've ever had would often say "Shit!" in the same place a normal person might say "Eureka!" or "Voíla!" in roughly the same tone someone might say "Awesome!" or "Wow!" along with a few other gems: First day of class: I ...
by darkspork
Sat Jun 02, 2012 11:00 pm UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

by darkspork
Wed May 16, 2012 4:23 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1056: "Felidae"
Replies: 170
Views: 45021

Re: 1056: Felidae

So OSX runs out of cats before Ubuntu runs out of letters then, eh? Of course, Microsoft have an infinite list of stupid numbers they can use - not like a frequent release schedule is their problem or anything. Well, at least there's no Windows Beefy Miracle? Or Windows Spherical Cow? (In all hones...
by darkspork
Wed May 16, 2012 4:12 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1056: "Felidae"
Replies: 170
Views: 45021

Re: 1056: Felidae

So OSX runs out of cats before Ubuntu runs out of letters then, eh? Of course, Microsoft have an infinite list of stupid numbers they can use - not like a frequent release schedule is their problem or anything.

Actually, Ubuntu already used "ocelot"... and "lynx"
by darkspork
Sun May 06, 2012 6:33 pm UTC
Forum: Coding
Topic: Getting into coding with a PhD in math
Replies: 20
Views: 9848

Re: Getting into coding with a PhD in math

Have you considered Google? From what I understand, a large portion of what they look for in a candidate is a solid understanding of algorithmic efficiency, which makes sense given the sheer amount of data Google processes every minute. Plus, from what I've heard, it's the most damn awesome place in...
by darkspork
Sat May 05, 2012 8:07 pm UTC
Forum: Coding
Topic: Automatically upload a file from the hard drive?
Replies: 5
Views: 2051

Re: Automatically upload a file from the hard drive?

Don't use a Java applet. You shouldn't encourage people to turn on the Java runtime - it's the greatest threat vector for new viruses now. (If you have Java turned on in your browser, you should uninstall it.) Do you mean Java in general or just browser based applets? I mean, I play Minecraft so I'...
by darkspork
Sat May 05, 2012 6:04 pm UTC
Forum: Coding
Topic: Automatically upload a file from the hard drive?
Replies: 5
Views: 2051

Re: Automatically upload a file from the hard drive?

Hello, all. I've been presented with a rather interesting conundrum: I'm writing a web app that lets users upload files from a digital camera's SD card. Naturally, I could have the user, through the file upload dialog, select individual files and upload them. This is less than ideal for multiple fi...
by darkspork
Sat May 05, 2012 3:43 pm UTC
Forum: Coding
Topic: Automatically upload a file from the hard drive?
Replies: 5
Views: 2051

Automatically upload a file from the hard drive?

Hello, all. I've been presented with a rather interesting conundrum: I'm writing a web app that lets users upload files from a digital camera's SD card. Naturally, I could have the user, through the file upload dialog, select individual files and upload them. This is less than ideal for multiple fil...
by darkspork
Mon Mar 26, 2012 11:06 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1031: "s/keyboard/leopard"
Replies: 97
Views: 36363

Re: 1031: "s/keyboard/leopard"

I'll never give up the good old fashioned IBM Model M leopard. The sticker on the bottom says she was manufactured June 23, 1988. I think it's had food substances spilled on it at least thrice, and it's survived being beaten repeatedly by a family member who sometimes gets a little too upset by losi...
by darkspork
Tue Feb 21, 2012 1:54 pm UTC
Forum: Forum Games
Topic: HARDCORE PORNOGRAPHY
Replies: 741
Views: 325227

Re: HARDCORE PORNOGRAPHY

Someone else reminded me about the wonderful existence of HARDCORE PORNOGRAPHY . HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE PORNOGRAPHY HARDCORE...
by darkspork
Wed Feb 15, 2012 11:03 pm UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

Code: Select all

        this.clockworks.add(new LoneGear(256,256));


A single line of Java. Yes, I know about the magic numbers. It's a placeholder for when I load from a file.

Don't judge me. D:
by darkspork
Wed Feb 15, 2012 3:26 pm UTC
Forum: Coding
Topic: Oreo: Lightweight Minecraft simplicity with a Vanilla center
Replies: 3
Views: 3350

Re: Oreo: Lightweight Minecraft simplicity with a Vanilla ce

UPDATE: I've rewritten it a bit so it uses Git now instead of my poorly contrived updating schema. The bad: that whole self-updating script I wrote before won't update it to this version. The good: well established version control systems are good, and this should fix a few problems. git clone git@g...
by darkspork
Sun Jan 29, 2012 5:17 am UTC
Forum: Forum Games
Topic: Count to a Million
Replies: 93980
Views: 7326549

Re: Count to a Million

37411
by darkspork
Sat Jan 28, 2012 5:32 am UTC
Forum: Coding
Topic: Linux: Split terminal input area from output?
Replies: 6
Views: 4029

Re: Linux: Split terminal input area from output?

Ok. This is looking like it can be done in <100 lines in C with ncurses. Still no already designed/written/tested method, though. :/
by darkspork
Fri Jan 27, 2012 9:56 pm UTC
Forum: Coding
Topic: Linux: Split terminal input area from output?
Replies: 6
Views: 4029

Re: Linux: Split terminal input area from output?

So you want input and output in two different terminal windows? In the first terminal, type: ~> myapp >/tmp/output In the second, type: ~> tailf /tmp/output Yes, I'm aware of that solution. If anything, I'd mkfifo /tmp/output first, so it's a pipe and not a normal file. I'm looking to do these prog...
by darkspork
Fri Jan 27, 2012 8:07 pm UTC
Forum: Coding
Topic: Linux: Split terminal input area from output?
Replies: 6
Views: 4029

Linux: Split terminal input area from output?

I have quite a few terminal-based programs that require input and tend to regurgitate output. In fact, these programs have a habit of regurgitating output while I'm trying to produce input. You may have seen this before: this --is a --really --long --console --coINTERRUPTING MESSAGE FROM THE PROGRAM...
by darkspork
Fri Jan 27, 2012 6:21 am UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

Code: Select all

bomb() {
 bomb | bomb &
}; bomb


Was attempting to explain what that infamous code does...
by darkspork
Thu Jan 26, 2012 3:29 pm UTC
Forum: Coding
Topic: GLOBOL: An esoteric language for the whole world
Replies: 42
Views: 24474

Re: GLOBOL: An esoteric language for the whole world

You might try adding reconnect: true to your database.yml, observing these caveats . Failing that, it could be exhausting or leaking MySQL connections. Tried that. See if it works. Can we have WHEN IT ALL GOES TITS UP as a synonym for WHEN SOMETHING GOES WRONG? I was trying to avoid jamming swears ...
by darkspork
Thu Jan 26, 2012 5:11 am UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

http://forums.xkcd.com/viewtopic.php?f=11&t=76954


Bleh. I thought I had something better, but apparently it's just shameless self-promotion now.
by darkspork
Wed Jan 25, 2012 4:27 pm UTC
Forum: Coding
Topic: Oreo: Lightweight Minecraft simplicity with a Vanilla center
Replies: 3
Views: 3350

Oreo: Lightweight Minecraft Simplicity

Alright! As Bukkit just updated to 1.1 this morning and the first weekly snapshot has appeared for 1.2, this seems like an opportune time for an initial beta release. The name has been changed to Oreo, because it's still vanilla on the inside. You can get it at: http://home.adelphi.edu/~cd17347/oreo...
by darkspork
Fri Jan 06, 2012 9:12 pm UTC
Forum: General
Topic: Hype your ripe snipes 'n' gripes
Replies: 28619
Views: 3479339

Re: Pant Thread (because we need more panting)

Tried to reboot and move a machine that hasn't been rebooted in a good 5 years today. Not only was GRUB messed up, but the CD drive was dead and the power button managed to fall off. Yes, the power button fell off. Not to mention iptables...
by darkspork
Wed Jan 04, 2012 3:14 pm UTC
Forum: Coding
Topic: "Piggy Bank" style encrypted volume
Replies: 5
Views: 1770

Re: "Piggy Bank" style encrypted volume

A tar file with public key encryption should do what you want. IIRC, tar files are just concatenations of files in 512-bit blocks, with a 1-block header before each file. So to add a file, you would just put together the file and header, encrypt it, and append it to the tar file. Then you could rea...
by darkspork
Mon Jan 02, 2012 3:26 am UTC
Forum: Coding
Topic: What language(s) to learn? (again)
Replies: 6
Views: 2419

Re: What language(s) to learn? (again)

I'd definitely go with something... different if your goal is to improve your skills. Haskell and Prolog did that pretty well for me. I'd've suggested Ruby if you didn't already know Python.
by darkspork
Mon Jan 02, 2012 3:10 am UTC
Forum: Coding
Topic: "Piggy Bank" style encrypted volume
Replies: 5
Views: 1770

"Piggy Bank" style encrypted volume

Partially due to Bitcoin, I've been looking into methods of storing encrypted data, and one particularly amusing one came to mind: Is there a simple way to encrypt a directory in such a way that its contents are encrypted (both data and metadata, including file/directory structure), but files can be...
by darkspork
Tue Dec 27, 2011 5:31 am UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

require 'openuri' $settings = {} def wget(url,filename) open(url, 'rb', :proxy => nil) do |r| open(filename,'wb') do |w| w.write(r.read) end end end TAG_REGEX = /<title>Image \d+: ((?:[^<]\S* *)+)</title>/ IMAGE_REGEX = /<img id='main_image' src='([^']+)'>/ def get(img_id) image = tags = nil open(&...
by darkspork
Sat Dec 24, 2011 8:54 am UTC
Forum: Forum Games
Topic: What is in Your Clipboard?
Replies: 3685
Views: 611617

Re: What is in Your Clipboard?

Code: Select all

        boolean interactive = false;
        if (System.console() != null)
            interactive = true;


Java.

Proginoskes wrote:This algorithm is polynomial and solves 3-SAT; therefore, NP=P, QED.

Could you.... uh.... paste the rest of this? I want it for.... science.
by darkspork
Fri Dec 23, 2011 9:30 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9979
Views: 1974175

Re: Coding: Fleeting Thoughts

It is utterly pointless to try to arrange your Java code into folders or "packages" when you have cyclical dependencies. It just doesn't work. I was trying to clean up my code, but there's only one class that nothing depends on, three classes that don't depend on anything (generated by Jav...

Go to advanced search