Skip to content

Instantly share code, notes, and snippets.

View marcaddeo's full-sized avatar
🦀

Marc Addeo marcaddeo

🦀
View GitHub Profile
@marcaddeo
marcaddeo / EventHandler.java
Created January 23, 2012 21:35
Event Handler for event based client server application.
package mamclient;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import csocket.Packet;
@marcaddeo
marcaddeo / class.db.php
Created January 23, 2012 21:44
A wrapper for PHP's MySqli class.
<?php
/*
** MySQL Abstraction Class
** Allows object creation for DB interaction on more advanced level.
** Objective of this class: Bring exceptions into MySQL errors to provide
** Better error verification and diagnosis.
**
** REQUIREMENTS:
** PHP5 with MySQLi support compiled and configured
@marcaddeo
marcaddeo / Crypto.java
Created January 23, 2012 23:11
Encryption methods
package crypto;
public class Crypto {
private char[] Key1 = {
// Omitted
};
private char[] Key2 = {
// Omitted
@marcaddeo
marcaddeo / Crypto.cpp
Created January 23, 2012 23:17
Encryption methods
#include "Crypto.h"
#include "keys.h"
Crypto::Crypto( void ) :
m_useNewKeys(false)
, m_localCounter()
, m_remoteCounter()
{}
@marcaddeo
marcaddeo / db-migrate.coffee
Created January 23, 2012 23:37
DB Migration tool to migrate from a JSON datastore to postgres
pg = require 'pg'
fs = require 'fs'
conString = "tcp://user:password@localhost/tv";
client = new pg.Client(conString);
client.connect();
mediaList = JSON.parse(fs.readFileSync('media-list/media.json'))
numbers =
@marcaddeo
marcaddeo / hank.coffee
Created January 23, 2012 23:45
A simple IRC bot
{Hook} = require 'hook.io'
irc = require 'irc'
http = require 'http'
redis = require 'redis'
config =
name: 'Hank'
delimiter: '@'
password: 'password'
server: 'irc.rizon.net'
tasdadada

Keybase proof

I hereby claim:

  • I am marcaddeo on github.
  • I am marcaddeo (https://keybase.io/marcaddeo) on keybase.
  • I have a public key whose fingerprint is 64F0 1535 6FE3 7ABE 3444 5611 AB5F C39B 9610 5359

To claim this, I am signing this object:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Marc Addeo">
<%= if assigns[:title] do %>
@marcaddeo
marcaddeo / background_process_fixes.patch
Last active July 3, 2018 18:45
Fixes to background_process
diff --git a/README.md b/README.md
index 09008b1..2b08d1b 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,3 @@
-<?php
-
-/**
- * @file
- * Module Installation Note.