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
# 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
# /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
//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
#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
# 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 |
NewerOlder