Skip to content

Instantly share code, notes, and snippets.

View joar's full-sized avatar
:bowtie:
Not wearing a bowtie

Joar Wandborg joar

:bowtie:
Not wearing a bowtie
View GitHub Profile

Wireshark HTTP traffic debugging

Usage

Without traffic source filtering http && http.content_type != "text/css" && http.content_type != "application/javascript" && http.content_type != "image/jpeg" && http.content_type != "image/png" && http.content_type != "image/gif"

With traffic source filtering ( in this case 173.203.203.8 is my remote server ) http && ( ip.src == 173.203.203.8 || ip.dst == 173.203.203.8 ) && http.content_type != "text/css" && http.content_type != "application/javascript" && http.content_type != "image/jpeg" && http.content_type != "image/png" && http.content_type != "image/gif"

Explanation

Usage

<?php
	$apikey = "YOUR API KEY HERE";
	$reachAPI = new ReachAPI($apikey, OBJECT);
	$result = $reachAPI->getFileDetails("2689373");
	echo "File Author: " . $result->Files[0]->Author;
?&gt;
@joar
joar / a-readme.md
Created November 23, 2010 09:42
Tumblr Audio Download

Tumblr Audio Download

This is a script that can be loaded via e.g. a bookmarklet.

Bookmarklet example

<a href="javascript:var wbgTumblr=document.createElement('script');wbgTumblr.src='https://gist.github.com/raw/711522/wbg-tumblr-audio.js';document.getElementsByTagName('head')[0].appendChild(wbgTumblr);">Tumblr Audio Download</a>

Installation

@joar
joar / pizza-order.php
Created November 24, 2010 12:49
Pizza order
<?php
# Create pizza
$pizza = new Pizza;
# Set ingredients
$pizza->setProperty('ingredients', array(
'curry',
'banan',
'fårost',
'oliver',
jwandborg@sophie:~$ curl -I www.reddit.com
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Set-Cookie: reddit_first=%7B%22organic_pos%22%3A%201%2C%20%22firsttime%22%3A%20%22first%22%7D; Domain=reddit.com; expires=Thu, 31 Dec 2037 23:59:59 GMT; Path=/
Server: '; DROP TABLE servertypes; --
Date: Fri, 03 Dec 2010 12:21:02 GMT
Connection: keep-alive
@joar
joar / a-readme.md
Created December 13, 2010 15:14
Real-time Twitter Buzz in a CLI

Requirements

  • sudo aptitude install php5-cli

Example

Lutontweets: RT @Political_FunRT @wearethebritish: RT @britishbullybee: Sweden bomb probe: Stockholm blast suicide bomber was... http://bit.ly/dUklQw
@ Mon Dec 13 15:23:52 +0000 2010

>RealScotnews: Insular Lifestyle Of Sweden Suicide Bomber: The suicide bomber behind the twin blasts in Stockholm lived and stu... http://bit.ly/e6VTvh

@joar
joar / netcat-copyright.md
Created January 11, 2011 09:09
`netcat` copyright message
@joar
joar / hundredsofmillions.py
Created March 15, 2011 09:36
Hundreds of millions
'''
Hundreds of millions
http://www.facebook.com/venturebeat/posts/10150115163154079
'''
''' The lowest amount considerable "hundreds of millions" '''
HofM = 200000000
''' The number of view of the official Halo Reach: Noble Map Pack trailer by Bungie '''
Ps = 572753
''' The average amount of time per player, if playing 8 hours a day '''

RULES FOR BEING HUMAN


  1. You will receive a body. You may like it or hate it, but it’s yours to keep for the entire period this time around.
  2. You Will Learn Lessons. You are enrolled in a full-time informal school called Life. Each day in this school, you will have the opportunity to learn lessons. You may like the lesson or think them irrelevant and stupid.
  3. There are no mistakes, only lessons. Growth is a process of trial, error, and experimentation. The "failed" experiments are as much a part of the process as the experiments that ultimately "work."
  4. Lessons are repeated until they are learned. A lesson will be presented to you in various forms until you have learned it. When you have learned it, you can then go on to the next lesson.
  5. Learning lessons does not end. There is no part of life that does not contain its lessons. If you are alive, there are lessons to be learned.
  6. "There" is no better a place than "here." When your "there" has become a "here", you will simply obtain