This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
# | |
# | |
# Libraries and infrastructure | |
sudo apt update -y | |
sudo apt install -y \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Title: Fulcrum Webhook for syncing data shares to MySQL database | |
* Notes: Requires PHP with PDO & allow_url_fopen enabled | |
* Author: Bryan R. McBride | |
* Source: https://gist.github.com/bmcbride/44afdc10ee943b4e7b92 | |
*/ | |
# Fulcrum app information | |
$formID = 'your-fulcrum-form-id'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INPUT=fire_hydrants.csv | |
OLDIFS=$IFS | |
IFS=, | |
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; } | |
while read -a csv_line | |
do | |
mv ${csv_line[0]}.pdf ${csv_line[8]}-${csv_line[0]}.pdf | |
done < $INPUT |
If you are trying to reproduce this exactly, I'm using the following environment:
- VirtualBox 4.3.12
- Bills Kitchen 3.0-rc4 (includes Vagrant, Packer, Chef, etc)
First challenge is to get a windows basebox from somewhere. I couldn't find a good one, so built one myself from the windows/boxcutter packer templates:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -w | |
class String | |
def starts_with?(prefix) | |
prefix.respond_to?(:to_str) && self[0, prefix.length] == prefix | |
end | |
end | |
HEADER_REGEX = /^#import\s+["<](.*)[">]/ |
Use this guide to link a path name to a feature's photo in the attribute table.
This assumes you have a column in your data containing the full path to the image you'd like to open (in this example, a field called photo_path
).
- Right click feature class → Properties
- On Actions tab:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- change 18 to whatever the max zoom level you want in your MBTiles | |
DELETE FROM images WHERE | |
tile_id IN (SELECT tile_id FROM map WHERE zoom_level > 18) AND | |
tile_id NOT IN (SELECT tile_id FROM map WHERE zoom_level <= 18); | |
DELETE FROM map WHERE zoom_level > 18; | |
UPDATE metadata SET value = '18' WHERE name = 'maxzoom'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run_pg_fouine(): | |
info = host_info[env.host_string] | |
db_name = info.tags.get('Name') | |
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf') | |
sudo('/etc/init.d/postgresql reload') | |
time.sleep(30) | |
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf') | |
sudo('/etc/init.d/postgresql reload') | |
run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt') | |
run('gzip -f /tmp/pgfouine.txt') |
NewerOlder