Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View DreadKnight's full-sized avatar
Working on Ancient Beast v0.5, woot!

Dread Knight DreadKnight

Working on Ancient Beast v0.5, woot!
View GitHub Profile
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreih6567o3roipyhgt2nhbvokttqnd6cibq6gbmp266u6jaxmcl4bue ✅
Create your profile today to start building social connection and trust online at
DreadKnight / sketchfab_embed
Created January 10, 2013 23:16
oembed conversion?
if ($embed == 1) echo '<div class="embed"><iframe frameborder="0" height="520" width="400" src="' . $r['embed'] . '?autostart=1&transparent=1&autospin=1&controls=0&watermark=0&desc_button=0&stop_button=0"></iframe></div>';
DreadKnight / gist:3184036
Created July 26, 2012 19:34
sorting fail.
/* Ancient Beast - Free Open Source Online PvP TBS: card game meets chess, with creatures.
* Copyright (C) 2007-2012 Valentin Anastase (a.k.a. Dread Knight)
* This file is part of Ancient Beast.
* Ancient Beast is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
DreadKnight / about
Created July 24, 2012 08:42
about me
Hey! I'm a bit of a shy forum lurker. Been waiting to post about what I do around here for years now to be honest... so please bear with me :)
Actually started this post so many times now, but never finished it, so I'm hoping I'll manage to write it down this time so that you can get to finally read it.
Consider it kinda like a message in a bottle.
I will probably rant a bit so that you have a bit more to read if you want to kill some time, otherwise just scroll down. It's not like you have all the time in the world, right?
I live in Romania. Ever since I was a little kid, a learned english language (no it's not native language from around here) by watching a lot of cartoons on the telly.
Back then, Cartoon Network wasn't really narrated into romanian, so kids would get to actually learn something useful.
I usually see both the empty and full halfs of the glass, so while there's the extra time and work put into narrating cartoons, it does more harm than good. Some things feel like they get worse overall with
DreadKnight / tard?
Created June 27, 2012 13:16
really riven?
Jun 27 15:16:16 <DreadKnight> how would I make an "back to top" button disappear when actually being top?
Jun 27 15:17:27 <riven> huh?
Jun 27 15:17:39 <DreadKnight> might have found what I was asking about
Jun 27 15:17:57 <DreadKnight> meh, jquery
Jun 27 15:20:10 * laen0k (~laen0k@ has joined #html
Jun 27 15:20:58 * sacho_ is now known as sacho
Jun 27 15:21:12 * Blumiere has quit (Quit: Leaving)
Jun 27 15:21:55 * Blumiere ( has joined #html
Jun 27 15:33:46 * myrman ( has joined #html
DreadKnight / gist:2988202
Created June 25, 2012 12:04
Never been able to start kazam :(
dread@FreezingMoon:~/Dropbox/AncientBeast$ kazam
Traceback (most recent call last):
File "/usr/bin/kazam", line 74, in <module>
appWindow = KazamApp(datadir, args.debug)
File "/usr/lib/python2.7/dist-packages/kazam/", line 238, in __init__
File "/usr/lib/python2.7/dist-packages/kazam/", line 578, in restore_state
File "/usr/lib/python2.7/dist-packages/gi/", line 43, in function
return info.invoke(*args, **kwargs)
$result = mysql_query('SELECT SUM(amount) AS total FROM ab_donors WHERE type="$"');
$query_data = mysql_fetch_array($result);
$total_dollars = (float) $query_data['total'];
echo $total_dollars;
.card {
width: 430px;
height: 550px;
background-image: url(card.png);
background-repeat: no-repeat;
padding: 15px;
margin: 0px;
vertical-align: top;
cursor: default;
DreadKnight / gist:2621287
Created May 6, 2012 09:43
url get change
var basePage = window.location.href.replace( /#.*/, "");
function showId(id) {{url:'details.php',post:'id='+id,width:880,height:650,topsplit:2,close:true,callback:function(b){
$(b).click(function() {
history.replaceState("", "", basePage);
history.replaceState("", "", basePage + "#id=" + id);
window.onload = function() {