Skip to content

Instantly share code, notes, and snippets.

View sam-m888's full-sized avatar
💭
May take a while to respond.

Sam M sam-m888

💭
May take a while to respond.
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2016 Matt Menzenski
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@jimmyz
jimmyz / gist:7ed286ba1c1942c018e5
Created February 4, 2015 00:11
List of Family History Related Open Source Projects
RootsDev
https://github.com/rootsdev/roots-search (Chrome Plug-in / JavaScript)
https://github.com/rootsdev/familysearch-javascript-sdk
https://github.com/rootsdev/gofamilysearch (Go FamilySearch SDK)
https://github.com/rootsdev/polygenea (Java and D, Collaborative Research-centric Data Model)
https://github.com/rootsdev/familysearch-reference-client (JavaScript/Angular, Tree Client for FamilySearch API)
https://github.com/rootsdev/genealogy-search (Chrome Extension)
https://github.com/rootsdev/people-inspector (Chrome Extension - historical-data.org microdata reader)
@samdark
samdark / github-post-receive.php
Last active October 11, 2019 10:05
Simple GitHub post-receive PHP hook
<?php
function cidr_match($ip, $ranges)
{
$ranges = (array)$ranges;
foreach($ranges as $range) {
list($subnet, $mask) = explode('/', $range);
if((ip2long($ip) & ~((1 << (32 - $mask)) - 1)) == ip2long($subnet)) {
return true;
}
}