Skip to content

Instantly share code, notes, and snippets.

@Maff-
Maff- / cod2_client_host_search_lan.txt
Created August 17, 2013 12:16
Call of Duty 2 game client searching for LAN servers
No. Time Source Destination DstPort Protocol Length Info
87 7.931300000 192.168.1.21 255.255.255.255 28960 UDP 57 Source port: 28960 Destination port: 28960
Frame 87: 57 bytes on wire (456 bits), 57 bytes captured (456 bits) on interface 0
Ethernet II, Src: 192.168.1.21 (00:9c:02:8e:cd:70), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
Internet Protocol Version 4, Src: 192.168.1.21 (192.168.1.21), Dst: 255.255.255.255 (255.255.255.255)
User Datagram Protocol, Src Port: 28960 (28960), Dst Port: 28960 (28960)
Data (15 bytes)
0000 ff ff ff ff ff ff 00 9c 02 8e cd 70 08 00 45 00 ...........p..E.
<?php
$ttl = 60*60*2; // 2 hours
parse_str($_SERVER['QUERY_STRING'], $q);
$out = array();
if (!empty($q['r']) && function_exists('apc_fetch')) {
if (!apc_exists('test-' . $q['r'])) {
header("Status: 404 Not Found");
@Maff-
Maff- / test
Created March 7, 2012 22:22
nginx 'catch all' config
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www/test;
index index.php index.html index.htm;
server_name test.localhost;
location / {
@Maff-
Maff- / projectedTexture_frag.glsl
Created May 16, 2011 13:52
A small update to Paul Houx's projectedTextureSample for Cinder
uniform sampler2D projectorTexture;
uniform sampler2DShadow projectorDepthMap;
uniform bool renderAmbient;
uniform bool renderDiffuse;
uniform bool renderSpecular;
uniform bool renderShadow;
uniform bool renderGobo;
uniform bool renderNormal;
@Maff-
Maff- / jsdomjquery.js
Created February 16, 2011 19:33
Demo setup of jsdom + htmlparser + jquery on Node (v0.4.0). Not sure if this is the right way to do it, please fork/comment if you have suggestions.
/**
* jsdom + htmlparser + jQuery @ Node v0.4.0
* use npm to install jsdom & htmlparser:
* $ npm install [email protected]
* $ npm install htmlparser
*
* Note: not sure what versions work or not
*
* https://github.com/tmpvar/jsdom
* https://github.com/tautologistics/node-htmlparser