Skip to content

Instantly share code, notes, and snippets.

albert jalbertbowden

Block or report user

Report or block jalbertbowden

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
View renew-old.php
<?php
require 'vendor/autoload.php';
include $_SERVER["DOCUMENT_ROOT"] . '/admin/AlmaAPIClient.php';
include 'DMVDatabaseClient.php';
include 'ErrorList.php';
use Rakit\Validation\Validator;
/**
* Provides basic CSRF protection.
*
View AlmaAPIClient.php
<?php
Class AlmaAPIClient {
const SUCCESS = "success";
const API_URL = 'https://api-na.hosted.exlibrisgroup.com/almaws/v1';
private $api_key;
public function __construct($key) {
@jalbertbowden
jalbertbowden / write-html.py
Created May 25, 2019
esri2geojson not complete
View write-html.py
"""import json
from esridump.dumper import EsriDumper
d = EsriDumper('http://example.com/arcgis/rest/services/Layer/MapServer/1')
# Iterate over each feature
for feature in d:
print(json.dumps(feature))
d = EsriDumper('http://example.com/arcgis/rest/services/Layer/MapServer/2')
@jalbertbowden
jalbertbowden / directory-loop.sh
Last active May 9, 2019
Bash script to loop through all directories in a given directory, and convert all .shp -> .geojson.
View directory-loop.sh
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
for f in /*;
do
for var in *.shp; do shp2geojson ${var%\.*}; done
done;
View google_script.gs
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6
function doGet(e){
return handleResponse(e);
}
// Enter sheet name where data is to be written below
var SHEET_NAME = "Sheet1";
View google_script_form.html
<form id="test-form">
<div>
<label>Field 1</label>
<input type="text" name="form_field_1" placeholder="Field 1"/>
</div>
<div>
<label>Field 2</label>
<input type="text" name="form_field_2" placeholder="Field 2"/>
@jalbertbowden
jalbertbowden / map.geojson
Created Apr 12, 2019
Shipwrecks - via Google My Maps
View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View nnk.md

Westmoreland County and the Northern Neck of Virginia offer many things to do and see to go along with your visit to Stratford Hall. Plan on a day trip or make it a weekender! Stratford Hall is also part of several regional and state birding, biking, hiking and history trails. We offer the following links to help you plan your visit:

@jalbertbowden
jalbertbowden / url-to-domain.php
Created Mar 29, 2019 — forked from davejamesmiller/url-to-domain.php
Get the domain name from a URL for display purposes in PHP
View url-to-domain.php
<?php
// This is PHP function to convert a user-supplied URL to just the domain name,
// which I use as the link text.
// Remember you still need to use htmlspecialchars() or similar to escape the
// result.
function url_to_domain($url)
{
You can’t perform that action at this time.