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
@DreadKnight
DreadKnight / Ancient Beast Bestiary
Created March 15, 2012 03:08
creatures displayed in table based levels and sins
<?php $page_title = "Ancient Beast - Bestiary";
include("../header.php");
include("../global.php");
?>
<script type="text/javascript" src="<?php echo $WorkingDir; ?>utils/tinybox.js"></script>
<?php
echo "$start_div<div style='text-align:center; position:absolute;'>";
$creatures = "SELECT * FROM ab_creatures ORDER BY sin, lvl";
$result = mysql_query($creatures) or die(mysql_error());
$i = 0;
@DreadKnight
DreadKnight / gist:2621287
Created May 6, 2012 09:43
url get change
var basePage = window.location.href.replace( /#.*/, "");
function showId(id) {
TINY.box.show({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() {
<style>
.card {
width: 430px;
height: 550px;
background-image: url(card.png);
background-repeat: no-repeat;
padding: 15px;
margin: 0px;
vertical-align: top;
cursor: default;
$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;
@DreadKnight
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/app.py", line 238, in __init__
self.restore_state()
File "/usr/lib/python2.7/dist-packages/kazam/app.py", line 578, in restore_state
self.volumebutton_audio2.set_value(audio2_vol)
File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
return info.invoke(*args, **kwargs)
@DreadKnight
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 http://briancray.com/posts/scroll-to-top-link-jquery-css/
Jun 27 15:17:57 <DreadKnight> meh, jquery
Jun 27 15:20:10 * laen0k (~laen0k@222.107.191.175) 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 (~a@c114-77-61-85.brodm3.vic.optusnet.com.au) has joined #html
Jun 27 15:33:46 * myrman (~friendly@c-a23c70d5.035-31-73746f28.cust.bredbandsbolaget.se) has joined #html
@DreadKnight
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
DreadKnight / gist:3184036
Created July 26, 2012 19:34
sorting fail.
<?php
/* 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
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="http://sketchfab.com/embed/' . $r['embed'] . '?autostart=1&transparent=1&autospin=1&controls=0&watermark=0&desc_button=0&stop_button=0"></iframe></div>';
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 https://3Box.io/