Skip to content

Instantly share code, notes, and snippets.

@leandrosilva
leandrosilva / Client.cs
Created October 31, 2010 02:54
Asynchronous Client/Server Socket Example with C# (from MSDN library)
// Asynchronous Client Socket Example
// http://msdn.microsoft.com/en-us/library/bew39x2a.aspx
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Text;
// State object for receiving data from remote device.
@kwik101
kwik101 / soundex2.js
Created August 9, 2011 16:59
soundex with Russian launguage support js version
var rules = [
[/[aehiouy]/g, ''],
[/[йуеёыахоэяиюьъ]/g, ''],
[/[с]?тч/g, 'щ'],
[/rl/g, 'r'],
[/[bfpvw]/g, '1'],
[/[бфпв]/g, '1'],
[/[cgjkqsxz]/g, '2'],
[/[цжкзсг]/g, '2'],
[/[dt]/g, '3'],
@mythz
mythz / RpcVsMessages.md
Created November 22, 2011 18:02
Difference between an RPC-chatty and message-based API

Difference between an RPC-chatty and message-based API

	public interface IService
	{
	  Customer GetCustomerById(int id);
	  Customer[] GetCustomerByIds(int[] id);
	  Customer GetCustomerByUserName(string userName);
	  Customer[] GetCustomerByUserNames(string[] userNames);
 Customer GetCustomerByEmail(string email);
@darktable
darktable / MiniJSON.cs
Created November 30, 2011 23:08
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

@phatboyg
phatboyg / Example.cs
Created September 9, 2012 17:30
Extensible Command Line Arguments for Topshelf
[Test]
public void Extensible_the_command_line_should_be_yes()
{
bool isSuperfly = false;
Host host = HostFactory.New(x =>
{
x.Service<MyService>();
x.AddCommandLineSwitch("superfly", v => isSuperfly = v);
@jonlabelle
jonlabelle / television_resolution_standards.md
Last active January 16, 2025 13:33
Digital and analog television standards resolution reference.

Television Standards

Digital and analog television standards resolution reference.

Digital TV Standards

Standard Resolution (dots × lines) DAR (H:V) Pixels
PixelVision 120 × 90 4:3 10,800
@ryanj
ryanj / .openshift\action_hooks\pre_build_nodejs
Last active May 24, 2016 13:57
Include support for packaging globally installable npm modules, or other executables, locally within a project's source (node_modules/.bin/)
#!/bin/bash
# Projects which rely on npm modules which are normally installed using "npm install -g"
# can make those dependencies available on OpenShift by including this file in their project source.
# Add this content to your project as ".openshift/action_hooks/pre_build_nodejs"
# Then, save your npm dependencies locally (without the '-g' flag):
# > npm install module_name --save
# Finally, add and commit your changes:
@KonradIT
KonradIT / hero4.md
Last active March 19, 2017 04:55
GoPro HERO4

#GoPro HERO4 (A tale of firmware leaks and marketing)

Written by /u/konrad-iturbe (Konrad Iturbe) and with help of /u/OverByThere's leaked firmware.


The GoPro HERO4 Black Adventure edition is 4x times more powerful than ever.

HERO4 cameras:

  • HERO4 Black (BANZAI)
@KonradIT
KonradIT / Hero4BlackWifi.md
Last active April 8, 2025 10:27
Wifi hacking for HERO4 Black