Skip to content

Instantly share code, notes, and snippets.

@jmenzel
jmenzel / MergeSortedArrays.cs
Last active July 31, 2016 21:08
Merge two sorted Arrays C#
//Merge two sorted Arrays of Integer > 0
//The second Array has the capacity to hold all elements
//Return a merged Array of a and b
//TestCase 1
var a = new int[] { 3, 5, 10, 11 };
var b = new int[] { 4, 8, 12, 17, 0, 0, 0, 0 };
var exp = new int[] { 3, 4, 5, 8, 10, 11, 12, 17 };
var res = MergeSortedArrays(a, b);
Console.WriteLine("Test 1: " + res.SequenceEqual(exp));
#!/usr/bin/env python
import socket
rawSocket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(0x0003))
rawSocket.bind(("mon0", 0x0003))
ap_list = set()
while True :
pkt = rawSocket.recvfrom(2048)[0]
if pkt[26] == "\x80" :
if pkt[36:42] not in ap_list and ord(pkt[63]) > 0:
ap_list.add(pkt[36:42])
@jmenzel
jmenzel / HelloWorld.cpp
Created December 10, 2011 23:40 — forked from rawbitrec/HelloWorld.cpp
Ye Olde Sea Pluss Pluss!
//created by Eliot Lash and Robert Muller on 10/3/10
//copyright Eliot Lash and Robert Muller 2011
//Welcome to Ye Olde Sea Pluss Pluss!
#include <iostream>
#include <string>
#include "olde.h"
#define normal