Skip to content

Instantly share code, notes, and snippets.

View dw5's full-sized avatar
🇨🇭
Making better tasting swiss cheese for mail

dw5

🇨🇭
Making better tasting swiss cheese for mail
  • Zurich, CH
  • 13:56 (UTC +02:00)
  • X @0x8616
View GitHub Profile
@alotaiba
alotaiba / google_text2speech.md
Created February 3, 2012 07:31
Google Text to Speech API

Google Text to Speech API

Base URL: http://translate.google.com/translate_tts
It converts written words into audio. It accepts GET requests.

GET

q
The query string to convert to audio

tl
Translation language, for example, ar for Arabic, or en-us for English

@PeeHaa
PeeHaa / SQL and PHP tutorial.md
Created April 11, 2012 20:48
SQL and PHP tutorial

-- WORK IN PROGRESS --

SQL and PHP tutorial

Introduction

Why this tutorial?

@taterbase
taterbase / upload.php
Created May 13, 2012 15:03
Simple file upload in php
<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>
@kris7t
kris7t / FindInArchive.cxx
Created May 31, 2012 18:46
PACK file decompilation
SLibEntryRef __thiscall SFileSystem__FindInArchive(SFileSystem *this, int index, const char *str)
{
SLibEntryRef result; // qax@3
char name_offset; // ST13_1@14
const char *name; // ST18_4@14
unsigned __int8 name_length; // ST12_1@14
SFileSystem *self; // [sp+0h] [bp-14h]@1
int cmp; // [sp+8h] [bp-Ch]@14
SLibEntryHead *lib_entry; // [sp+Ch] [bp-8h]@13
SLibEntryRef *ref; // [sp+Ch] [bp-8h]@14
@kris7t
kris7t / gist:2850110
Created June 1, 2012 08:01
Patch S.W.I.N.E. v1.9 to support 800x600, 1366x768, 1920x1080, 1920x1200 (loses support for 1024x768, 1280x1024, 1600x1200).
This difference file has been created by IDA Pro
swine.exe
0012F735: 30 33
0012F736: 32 36
0012F737: 34 36
0012F741: 32 39
0012F742: 38 32
0012F747: 32 38
0012F748: 34 30
@vanhoefm
vanhoefm / gamespy.lua
Created July 18, 2012 19:04
Wireshark Gamespy Protocol Dissector
-- Wireshark LUA script to handle Gamespy Packets
trivial_proto = Proto("gamespy","Gamespy Protocol")
-- XOR Cipher:
local tab = { -- tab[i][j] = xor(i-1, j-1)
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, },
{1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, },
{2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13, },
{3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12, },
{4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11, },
{5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10, },
@chrislkeller
chrislkeller / README.md
Last active February 3, 2022 08:02
Displaying data from a flat JSON file on a Handlebars.js template file rendered with AJAX.

Demo: ajax-handlebars

This repo's location has changed.

@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@alimbada
alimbada / Wake.ps1
Last active October 17, 2024 22:59
PowerShell script for sending Wake On LAN magic packets to given machines/MAC address(es)
#######################################################
##
## Wake.ps1, v1.0, 2013
##
## Adapted by Ammaar Limbada
## Original Author: Matthijs ten Seldam, Microsoft (see: http://blogs.technet.com/matthts)
##
#######################################################
<#
@mharsch
mharsch / gist:5188206
Last active February 8, 2024 02:43
serve HLS (HTTP Live Streaming) content from node.js

HLS streaming from node

Provided that you already have a file or stream segmenter generating your .m3u8 playlist and .ts segment files (such as the ffmpeg 'hls' muxer), this little node server will serve up those files to an HLS compatible client (e.g. Safari). If you're using node for your streaming app already, this obviates the need to serve the HLS stream from a separate web server.

loosely based on https://gist.github.com/bnerd/2011232

// loosely based on https://gist.github.com/bnerd/2011232
// requires node.js >= v0.10.0
// assumes that HLS segmenter filename base is 'out'
// and that the HLS playlist and .ts files are in the current directory