Skip to content

Instantly share code, notes, and snippets.

Neil Alexander neilalexander

  • United Kingdom
Block or report user

Report or block neilalexander

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
neilalexander / example.go
Created Jan 9, 2019
macOS/iOS: Writing to NSLog using Golang (using Cgo)
View example.go
package myapp
import "log"
mobilelog := MobileLogger{}
logger := log.New(mobilelog, "", 0)
#some of this code was contributed by Arcelier
#original code
#multithreaded by neilalexander
import psycopg2
import json
import socket
import sys
import time
import ipaddress
neilalexander /
Last active Jul 13, 2017
Python 3 functions for comparing complex dict structures for additions, changes and deletions, and for walking the tree and running a given function on nodes.
class DeltaDict:
# changes(dict1, dict2) returns dict
# Finds nodes that appear in both dict1 and dict2 but
# where the values have changed
def changes(d1, d2):
d = dict()
s = set(d1.keys()).intersection(set(d2.keys()))
neilalexander / sendall.c
Created Jun 29, 2012
Some interesting code that will send a UDP packet to all available broadcast/point-to-point IPv4 addresses
View sendall.c
#include <sys/socket.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <ifaddrs.h>
#include <stdlib.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
You can’t perform that action at this time.