Skip to content

Instantly share code, notes, and snippets.

View psyomn's full-sized avatar
♥️
HARD WORK AND DISCIPLINE

psyomn

♥️
HARD WORK AND DISCIPLINE
  • Montreal
View GitHub Profile
@psyomn
psyomn / gist:3956399
Created October 26, 2012 01:00
Creating a table in SQLite3 + C
#include <stdio.h>
#include <sqlite3.h>
static int
print_table_variables
(
void * NotUsed
, int rows_affected
, char ** field_value
, char ** column_name
@psyomn
psyomn / xmler.rb
Created October 9, 2012 14:32
Making objects to XML with Rubys' reflection (still wip)
# Author::Simon Symeonidis
# This is a funky way to produce xml from a very simple object
# with very simple instance variables. I was particularly amused
# with the 'send' function since many times in OOP, we say that
# the objects are sending messages to each other; however in this
# case it's quite literal.
#
# If for some reason you want to use this dumb script to check it
# out, it's very simple. Just create a class Person with instance
# variables 'name', and 'surname' and include the module in the
@psyomn
psyomn / registry.rb
Created April 30, 2012 21:39
Just a simple udp server that can be used as a registry.
require 'socket'
# This is the main registry.
# When an individual node is started, it first looks
# for the registry and provides its information so that
# other nodes can query this entity for the location of
# said nodes.
class Registry
@psyomn
psyomn / .svnignore
Created January 25, 2012 00:51
Svn Ignore / Bladerunners
# For the C# project of bladerunners!
bin
obj