Skip to content

Instantly share code, notes, and snippets.

View xeoncross's full-sized avatar

David Pennington xeoncross

View GitHub Profile
@xeoncross
xeoncross / fetcher.php
Created September 17, 2012 19:54 — forked from memphys/fetcher.php
fetch some url through tor
<?php
class Fetcher
{
private $_torIp = '127.0.0.1';
private $_torProxyPort = '8118';
protected function _request($url)
@xeoncross
xeoncross / traveling-salesman.php
Created September 18, 2012 14:07 — forked from tlhunter/traveling-salesman.php
PHP Traveling Salesman Genetic Algorithm
<?php
ini_set("error_reporting", E_ALL & ~E_NOTICE);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Genetic Algorithm : TSP : PHP Implementation by Thomas Hunter</title>
<style>
body {
@xeoncross
xeoncross / array.php
Created September 20, 2012 14:31
PHP Form Builder
<?php
function assoc_array_map($cb, $arr) {
$new_array = array();
foreach ($arr as $key => $value) {
array_push($new_array, $cb($key, $value));
}
return $new_array;
@xeoncross
xeoncross / gdrivecms.php
Created September 20, 2012 14:37 — forked from timwis/gdrivecms.php
GDriveCMS allows you to use Google Docs' familiar interface for adding content to a mobile-optimized web page. Simply create a Google Document with whatever content you want, publish it to the web (in the File menu), and render it through this script.
<?php
/* GDriveCRM
Created by Tim Wisniewski (timwis.com)
GDriveCMS allows you to use Google Docs' familiar interface for adding content to a mobile-optimized web page.
Simply create a Google Document with whatever content you want, publish it to the web (in the File menu),
and render it through this script.
1. Create a document in Google Drive (Google Docs)
2. Go to File > Publish to the web
3. Click Start Publishing & check Automatically republish
4. Grab the document link (URL) in that dialog
@xeoncross
xeoncross / Subtitle.go
Created October 1, 2012 17:15 — forked from bemasher/Subtitle.go
Subtitle decoder basic functionality written in Golang.
package main
import (
"io"
"os"
"fmt"
"log"
"bytes"
"image"
"image/png"
@xeoncross
xeoncross / solarize.sh
Created October 4, 2012 17:56 — forked from codeforkjeff/solarize.sh
shell script for setting gnome-terminal color palette to use Solarized theme
#!/bin/sh
#
# Shell script that configures gnome-terminal to use solarized theme
# colors. Written for Ubuntu 11.10, untested on anything else.
#
# Solarized theme: http://ethanschoonover.com/solarized
#
# Adapted from these sources:
# https://gist.github.com/1280177
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/
@xeoncross
xeoncross / Description.js
Created October 24, 2012 23:26 — forked from tanguylebarzic/Description.js
DKIM signing with Node.js
/*
Heavily inspired by the PHP implementation made by Ahmad Amarullah (available at http://code.google.com/p/php-mail-domain-signer/), with the help of http://phpjs.org/.
Setup:
In dkim-raw-email.js, change the location of your private key and the associatedDomain accordingly to your needs.
Example of use (using aws-lib, https://github.com/mirkok/aws-lib):
@xeoncross
xeoncross / top-cms-projects
Created November 5, 2012 03:04 — forked from abpin/top-cms-projects
List of top 1200 CMS systems
1. Joomla!
2. Drupal
3. Mambo
4. TYPO3 Enterprise CMS
5. WebGUI
6. WordPress
7. Plone
8. Xoops
9. PHP Nuke
10. eZ Publish
@xeoncross
xeoncross / PCREConverter.php
Created November 14, 2012 20:30 — forked from devote/PCREConverter.php
PCRE Converter
<?php
/**
* Конвертер регулярного выражения
*
* @author Pakhtinov Dmitriy
* @copyright 2012 Pakhtinov Dmitriy
* @data 14.11.2012
*/
class PCREConverter {
@xeoncross
xeoncross / Webserver.c
Created November 19, 2012 21:05
A web server in C language using only the standard libraries and thought it would be useful for you guys if I share the code. The server runs on Linux and includes features like handling HTTP GET request, handling content types(txt, html, jpg, zip. rar,
/*
* WebServer.c
*
* Created on: Nov 3, 2012
* Author: pavithra
*
* A web server in C language using only the standard libraries.
* The port number is passed as an argument.
*
* http://css.dzone.com/articles/web-server-c