• dafk.net / up^ - come break my stuff
    46 replies, posted
Ok, I see that one. Still, is it really necessary to force all 'text/*' to 'text/plain'?
[QUOTE=itsbth;25430981]Ok, I see that one. Still, is it really necessary to force all 'text/*' to 'text/plain'?[/QUOTE] You never know
I just force everything to be downloaded excluding image/* and text/plain. [editline]16th October 2010[/editline] They're displayed on the page.
Just fixed the percentage bar. The problem was that some uploads were so fast, jquery animations couldn't keep up, and it would just stack up. That resulted in the percentage bar continuing on it's merry way long after the upload was actually complete. Fixing it was simple, just a matter of clearing the animation buffer before animating it again. This is also a simple way to fix those cases where you quickly hover your mouse over an object, say a sliding panel, and it just keeps sliding in and out even after you stopped. [code] $( ... ).stop(true, true).animate(... [/code]
That definitely fixed it. Works flawlessly on my end now.
Well now, let's see. Fixed [b][url]http://go.dafk.net[/url][/b], all is well once more. Fixed all the small issues with [b][url]http://up.dafk.net[/url][/b], SauceHelmet did most of the work on the Apache/PHP Config end of things. Released [b][url]http://paste.dafk.net[/url][/b] Not too bad for a few hours of work, right?
Awesome site man!
New page [url]http://miniscurl.dafk.net/[/url] Thanks to -HP- for adding go.dafk to his awesome extension. Check out his topic over at [url]http://www.facepunch.com/showthread.php?1015037-Miniscurl-URL-Shortener-for-Chrome[/url] or follow the above link to download it.
File upload, url shortening, a pastebin and rickrolling! What more could you possibly need?
[QUOTE=-HP-;25531757]File upload, url shortening, a pastebin and rickrolling! What more could you possibly need?[/QUOTE] File download, URL lengthening, copybin. Thanks.
[QUOTE=Siemens;25544661]File download, URL lengthening, copybin. Thanks.[/QUOTE] This man is a genius. [editline]21st October 2010[/editline] Made some huge optimizations to the site, some that I should've done right from the start, others that I just finished working on: - Wherever possible, I integrated my own caching system. HTML files are minified and cached for 24 hours. (saves a few hits to the database, and dramatically decreases time spent with PHP) - Set various apache and php settings to their optimal values. - Wrote a simple python script to recursively find and minify all .CSS and .JS files on the production server. (If you want it, just say it.) - Compressed various other assets and tweaked things here and there. The speed increase is very noticeable, doesn't interfere with my workflow on the development server (since all this optimization is done automatically on the server), and tools such as YSlow and Google's PageSpeed confirm it.
Looks good, but please promise me you get rid of those cyan colors and find a basic/typographically correct color scheme.
Typographically correct color scheme? Honey, typography and color are two very different things, and while they are both two very important aspects, "typographically correct color scheme" just sounds like what someone's uncle would say when trying to sound knowledgeable about design. Personally I'm very fond of the current color scheme, but I did hear a couple of complaints, so I'll toss that up on the list of things to look into once more, thanks.
nice! impressive work
[QUOTE=StinkyJoe;25585171]Typographically correct color scheme? Honey, typography and color are two very different things, and while they are both two very important aspects, "typographically correct color scheme" just sounds like what someone's uncle would say when trying to sound knowledgeable about design. Personally I'm very fond of the current color scheme, but I did hear a couple of complaints, so I'll toss that up on the list of things to look into once more, thanks.[/QUOTE] Yeah you're probably right. It's been a while since I've had those classes, heh.
Little PHP api loader... [php] function dafk_up($fdata) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)"); curl_setopt($ch, CURLOPT_URL, "http://up.dafk.net/up.php"); curl_setopt($ch, CURLOPT_POST, true); $post = array( "uploaded-file" => "@$fdata", ); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $response = curl_exec($ch); $result = str_replace("\/", "/", $response); $result = str_replace('{"error":false,"msg":"', '', $result); $result = str_replace('"}', '', $result); return $result; } function dafk_go($url) { $result = file_get_contents("http://go.dafk.net/new.php?url=$url&type=text"); if($result == "error: the specified url does not appear to be valid. if you think this is a mistake please contact us / bug@dafk.net (hello)") { return false; } else if($result == "error: the 'url' argument is necessary (none)") { return false; } else { return $result; } [/php]Should work, I haven't tested the go api.
[QUOTE=supersnail11;25662077]Little PHP api loader... Should work, I haven't tested the go api.[/QUOTE] Sometime this week the API's across the site will be changed to include error codes (but the input methods/arguments will not), so your script will need some slight editing, but good work!
Sorry, you need to Log In to post a reply to this thread.