Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am xaptronic on github.
* I am alexpilon (https://keybase.io/alexpilon) on keybase.
* I have a public key ASDLImMFBDRBlRr77L_mUVMqdGlfVr0UAruhRe1JrDkFvQo
To claim this, I am signing this object:
## you may need sudo permission to execute some commands or swith to root
# if installed old version by yum, remove it first
# sudo yum remove tmux libevent libevent-devel libevent-headers
# install deps
sudo yum install gcc kernel-devel make ncurses-devel
# create temp dir
mkdir /tmp/for-latest-tmux
### Keybase proof
I hereby claim:
* I am xaptronic on github.
* I am alexpilon (https://keybase.io/alexpilon) on keybase.
* I have a public key whose fingerprint is 296E 6245 0A52 5C06 DC11 8F53 6A45 A6EF 4BAB C243
To claim this, I am signing this object:
<?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 {
<?php
# Algorithm found here: http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
$filename = 'image.jpg';
list($width, $height) = getimagesize($filename);
$img = imagecreatefromjpeg($filename);
$new_img = imagecreatetruecolor(8, 8);
<?php
error_reporting(E_ALL);
define('NUM_FEATURES', 3);
// My dataset describes cities around the world where I might consider living.
// Each sample (city) consists of 3 features:
// * Feature 1: average low winter temperature in the city
// * Feature 2: city population, in millions
@xaptronic
xaptronic / .bashrc
Created July 21, 2012 19:31
bash rc trix!
# yeah!
@xaptronic
xaptronic / .gitignore
Created April 24, 2012 03:42
my vimrc file
*.swp
.*.swp
..*.un~
.*.un~
@xaptronic
xaptronic / sf_sync
Created March 8, 2012 19:14
symfony remote sync
REMOTE=$1
rsync_extra=$2
if [ -z "$REMOTE" ]; then
echo "Usage: sf_sync <sync_to> (what environment)"
echo "Syncs changes made to the current directory tree to <sync_to>"
echo "E.g.; alex@hactar ~/dev/trunk $ sf_sync local"
echo "Files in the current directory tree (~/dev/trunk) will be automatically pushed to tpweb:code/trunk whenever a change is made."
exit 1;
fi
@xaptronic
xaptronic / gist:1670249
Created January 24, 2012 13:49
Git-ftp!
useradd -M -N -g nobody trackmygreen
while inotifywait -e modify commit; do echo "commit modified"; done
date %k:%M:%S.%N