Skip to content

Instantly share code, notes, and snippets.

@xbakesx
xbakesx / card.json
Created September 9, 2012 04:18
Card
{
id: "23928",
name: "Gluttonous Zombie",
color: "16",
manacost: "[4],16",
cmc: "5",
type: "Creature ",
rules: "Fear (This creature can’t be blocked except by artifact creatures and/or black creatures.)",
power: "3",
toughness: "3",
@xbakesx
xbakesx / Quiz.java
Created September 1, 2012 16:26
Quiz Questions
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.JOptionPane;
public class Quiz
{
public static void main(final String[] args)
@xbakesx
xbakesx / gist:2714045
Created May 16, 2012 21:21
flotr2 pie chart
var pieOptions = {
HtmlText : false,
grid : {
verticalLines : false,
horizontalLines : false
},
xaxis : { showLabels : false },
yaxis : { showLabels : false },
@xbakesx
xbakesx / gist:2660527
Created May 11, 2012 15:44
find src width height
<?php
$matches = array();$html = 'lkjasflj <img src="some_image.jpg" alt="other text" width="500px" height="400px" checked="checked"/> lkajsdf';
$junk = "[^>]*";
$src = "src=\"([^\"]*)\"";
$width = "width=\"([^\"]*)\"";
$height = "height=\"([^\"]*)\"";
preg_match_all("#<img ($junk)>#", $html, $matches, PREG_SET_ORDER);
$match = array_pop(array_pop($matches));
@xbakesx
xbakesx / gist:2656042
Created May 10, 2012 21:32
print args
#include <stdio.h>
void main(int argc, char *argv[]) {
int i;
for (i = 0; i < sizeof(*argv); ++i)
{
printf("test(%d) = %s\n", i + 1, argv[i + 1]);
}
}