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
# build executable linked against static lib using NDK | |
# Usage: <NDK_Location>/ndk-build NDK_PROJECT_PATH=./ NDK_APPLICATION_MK=./Android.mk | |
# (Assuming 'pwd' is your native code location) | |
LOCAL_PATH := $(call my-dir) | |
#prebuilt static library | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := foo | |
LOCAL_SRC_FILES := foo.a |
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
#Based on https://gist.github.com/rtorr/3148833# | |
#Extended to take a list of fields to replace the query for | |
class CaseInsensitiveManager(models.Manager): | |
def __init__(self, fields=None, *args, **kwargs): | |
if fields != None: | |
self.fields = fields | |
super(CaseInsensitiveManager, self).__init__(*args, **kwargs) |
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
//requires esri leaflet, leaflet, proj4js | |
//fiddle at https://jsfiddle.net/a8aLj0nk/13 | |
var map = L.map('map').setView([-34.00, 151.00], 9); | |
var position = 0; | |
var marker; | |
L.esri.tiledMapLayer("http://mapsq.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPITopoMap/MapServer", { | |
detectRetina: true, | |
reuseTiles: true |
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
# /lib/systemd/system/ngrok.service.d/env.conf | |
[Service] | |
#which tunnel, or all? | |
Environment="TUNNEL=--all" | |
#log format | |
Environment="LOG_FORMAT=logfmt" | |
#log level |
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
# Use this in a situation where you want a headless Linux box with multiple GPU boards but no desktop environment | |
# Fake EDID convinces drivers that a monitor is connected | |
# Use any EDID binary file | |
# To start a fake X server make a systemd file with something like: | |
# ExecStart=/usr/bin/tcsh -c 'xinit /opt/set-gpu-fans/setfanspeed.sh -- :0 -once -config /opt/set-gpu-fans/xorg.rob' | |
# See other gist for fan setting script : https://gist.github.com/RobDeBagel/a960c2b157256c162220e60300529cf0 | |
Section "ServerLayout" | |
Identifier "Layout0" |
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 needs to be called from xinit | |
# See https://gist.github.com/RobDeBagel/0e126a56b0ee9f23551a98fb258414c | |
# Set fan speeds appropriately. The curve is tailored to my own environment | |
# Also set clock speeds | |
#!/bin/bash | |
setFanSpeed() { | |
eval "nvidia-settings -a [gpu:$2]/GPUFanControlState=1 -a [fan:$2]/GPUTargetFanSpeed=$1" > /dev/null |
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/local/bin/python3 | |
import csv | |
import argparse | |
import sys | |
parser = argparse.ArgumentParser(description='Cleanup MEbank (AU) CSV files with descriptions split over multiple lines') | |
parser.add_argument('infile', nargs='?', type=argparse.FileType('r'), default=sys.stdin) | |
parser.add_argument('outfile', nargs='?', type=argparse.FileType('w'), default=sys.stdout) | |
parser.add_argument('--invertorder', action='store_true') |
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
class Survex < Formula | |
desc "Cave Surveying Tool" | |
homepage "https://www.survex.com" | |
url "https://survex.com/software/1.2.36/survex-1.2.36.tar.gz" | |
sha256 "8781f33daf61c5d22e52400e6130e66a1fec7557cf9aa793d0e26e9b37204ed0" | |
revision 4 | |
depends_on "wxmac" | |
depends_on "proj" | |
depends_on "ffmpeg" |
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
from qgis.core import * | |
from qgis.gui import * | |
import math | |
import random | |
""" | |
Define a grid based on the interval and the bounding box of | |
the feature. Grid will minimally cover the feature and be centre aligned | |
Create a multi-point geometry at the grid intersections where |
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
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> | |
<qgis styleCategories="AllStyleCategories" minScale="1e+08" hasScaleBasedVisibilityFlag="0" version="3.8.0-Zanzibar" maxScale="0"> | |
<flags> | |
<Identifiable>1</Identifiable> | |
<Removable>1</Removable> | |
<Searchable>1</Searchable> | |
</flags> | |
<customproperties> | |
<property value="false" key="WMSBackgroundLayer"/> | |
<property value="false" key="WMSPublishDataSourceUrl"/> |
OlderNewer