Skip to content

Instantly share code, notes, and snippets.

{ "elements": [ { "type": "bar_3d", "values": [ 35.7, 45, 9.1, 1.5, 8.6 ], "colour": "#D5282A", "alpha": 1, "tip": "#val#%" }, { "type": "tags", "values": [ { "x": 0, "y": 35.7 }, { "x": 1, "y": 45 }, { "x": 2, "y": 9.1 }, { "x": 3, "y": 1.5 }, { "x": 4, "y": 8.6 } ], "font": "Verdana", "font-size": 10, "colour": "#000000", "align-x": "center", "text": "#y#%" } ], "title": { "text": "Send younger14, natt14, sugar14 , lilo14 eller babes14 til 2030 for \u00e5 stemme", "style": "{font-size: 15px; font-family: Times New Roman; font-weight: bold; color: #000000; text-align: center;}" }, "bg_colour": "#FFFFFF", "x_axis": { "3d": 5, "colour": "#021840", "grid-colour": "#FFFFFF", "labels": { "colour": "#000000", "labels": [ "Stemmer: 346", "Stemmer: 436", "Stemmer: 88", "Stemmer: 15", "Stemmer: 83" ] } }, "y_axis": { "colour": "#021840", "grid-colour": "#FFFFFF", "min": 0, "max": 50, "steps": 10, "labels": { "colour": "#FFFFFF", "text": "#val#%" } } }
@predakanga
predakanga / default.rb
Created August 5, 2014 08:16
Devbox cookbook's default recipe
#
# Cookbook Name:: devbox
# Recipe:: default
#
# Copyright 2013, Lachlan Pease
#
# All rights reserved - Do Not Redistribute
#
include_recipe 'nginx::commons_dir'
from __future__ import print_function
import os, os.path, sys, threading, signal, time, collections
from Queue import Queue
from SocketServer import UnixStreamServer, StreamRequestHandler, ThreadingMixIn
from click import command, option
from ldif import LDIFWriter
from uuid import UUID, uuid5
import oursql
class GenericPool(object):
@predakanga
predakanga / php_gdbinit
Created February 23, 2015 07:32
GDB PHP stacktraces
define set_ts
set $tsrm_ls = $arg0
end
document set_ts
set the ts resource, it is impossible for gdb to
call ts_resource_ex while no process is running,
but we could get the resource from the argument
of frame info.
end
sub get {
my $url = shift;
my $ua = LWP::UserAgent->new;
$ua->agent("Bot");
my $request = HTTP::Request->new(GET => $url);
my $result = $ua->request($request);
#print $result->content;
return $result->content;
}
package main
import (
"crypto/x509"
"crypto/tls"
"encoding/pem"
"os"
"io/ioutil"
"github.com/jessevdk/go-flags"
"time"
@predakanga
predakanga / MemoryOutput.php
Created August 22, 2012 02:07
MemoryOutput
<?php
namespace Fusion\Framework\CronBundle\Command;
use Symfony\Component\Console\Output\Output;
/**
* MemoryOutput implements OutputInterface, writing to an internal buffer
*/
class MemoryOutput extends Output {
protected $backingStore = "";
@predakanga
predakanga / CommandRunCommand.php
Created August 27, 2012 10:51
Code for running commands
<?php
/**
* The actual command which is used to call other commands
*/
class CommandRunCommand extends ContainerAwareCommand
{
protected function configure()
{
$this->setName("cmd:run")
@predakanga
predakanga / gist:3487705
Created August 27, 2012 11:30
Calling command from controller
<?php
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
/**
* @Route("/test")
*/
<?php
namespace Acme\UserBundle\Form\Type;
use JMS\DiExtraBundle\Annotation\FormType;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Doctrine\ORM\EntityRepository;