Skip to content

Instantly share code, notes, and snippets.

@justincy
justincy / Penydarren.geojson
Created February 27, 2014 15:22
Mapshaper infinite loop bug
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@justincy
justincy / filter-stacktraces.ps1
Created December 10, 2012 21:12
Filter out stacktraces from a logfile and format them nicely
$inputfile = "C:\path\to\logfile.log"
$outputfile = "C:\path\to\output.log"
$stacktraces = get-content $inputfile | where { $_ -like '{*' } | get-unique
new-item $outputfile -type file -force
foreach($st in $stacktraces) {
add-content $outputfile (ConvertFrom-Json $st).stacktrace
add-content $outputfile "`r`n===========================================================================`r`n"
}
@justincy
justincy / git-status.sh
Created December 16, 2015 22:55
Iterate over all sub directories and print a list of which git repos have uncommitted changes.
#!/bin/bash
# Loop through all files and directories
for dir in ./*
do
# Skip files
if [ -d $dir ]; then
cd $dir;
@justincy
justincy / script.js
Last active August 26, 2016 00:38
Home Teaching Needs Analysis - Households jQuery Scraping Script
// This script generates a tab-delimeted list of households with the currently
// assigned home teachers. Copy and paste the script into the browser JS console
// (opened by hitting the F12 key on PCs) when on the Households tab of the
// Hometeaching section of Leader and Clerk Resources on lds.org.
// The output is formatted in a way that allows you to pase it into your favorite
// spreadsheet program.
// For each household...
$('.member-list-body').map(function(){
var row = $(this);
@justincy
justincy / ancestry-profile.json
Created August 31, 2016 15:52
Genscrape examples
{
"persons": [{
"id": "1",
"sources": [{
"description": "#7"
}],
"gender": {
"type": "http://gedcomx.org/Female"
},
"names": [{
{
"persons": [{
"id": "KWZP-453",
"sources": [{
"id": "a15d4b0a-39d6-47a6-90fb-1f4b20199eb2",
"description": "https://familysearch.org/platform/sources/descriptions/M9XQ-7ZP",
"attribution": {
"contributor": {
"resource": "https://familysearch.org/platform/users/agents/MM7L-QCH"
},
@justincy
justincy / data.json
Created September 16, 2016 16:59
Hyrum Don Carlos Clark - Ancestry
{
"persons": [{
"id": "1",
"sources": [{
"description": "#6"
}],
"gender": {
"type": "http://gedcomx.org/Male"
},
"names": [{
@justincy
justincy / example.json
Created September 22, 2016 18:24
Custom GEDCOMX fact type example
{
"persons": [{
"id": "K1VK-9VB",
"sources": [{
"id": "8cc55ba1-0509-410a-adbd-c0576bf3ade1",
"description": "https://familysearch.org/platform/sources/descriptions/9XVK-5K8",
"attribution": {
"contributor": {
"resource": "https://familysearch.org/platform/users/agents/MMJF-TLW"
},
@justincy
justincy / Biography Text Additions.txt
Created September 22, 2016 22:11
Example Ancestry Tree data
* : Theodore Yurkiewicz
* : Theodore York
* Fact: http://gedcomx.org/Christening
* Fact: http://gedcomx.org/Immigration
* Fact: http://gedcomx.org/Immigration
* Fact: http://gedcomx.org/Emigration
* Fact: http://gedcomx.org/Residence
* Fact: http://gedcomx.org/Residence
* Fact: http://gedcomx.org/Residence
* Fact: http://gedcomx.org/Residence
@justincy
justincy / manifest.js
Created April 14, 2017 16:12
Minimized webpack manifest.js
! function(e) {
function r(n) {
if (t[n]) return t[n].exports;
var o = t[n] = {
i: n,
l: !1,
exports: {}
};
return e[n].call(o.exports, o, o.exports, r), o.l = !0, o.exports
}