Skip to content

Instantly share code, notes, and snippets.

@nickludlam
nickludlam / gist:d69fcd1eeca0e41c7c01
Last active August 29, 2015 14:05
Overwolf for Elite: Dangerous
1. Grab the latest Overwolf from their website.
2. Open AppData\Local\Overwolf\GamesList.7804102.xml
3. Paste this at the bottom, *above* the </ArrayOfGameInfo> tag:
<GameInfo>
<ID>105222</ID>
<GameTitle>Elite Dangerous</GameTitle>
<LuancherNames>
<string>EliteDangerous.exe</string>
</LuancherNames>
@nickludlam
nickludlam / gist:0b6a36d1facea1d33c12
Created July 2, 2014 12:57
Accessing V1 projects using the V2 Berg Cloud Python API
# LittleCounter - A simple demonstration of how you use the BERG Cloud Linux
# client libraries to fetch and send data to BERG Cloud. For
# more info see http://bergcloud.com/
#
# This example code is in the public domain.
#
# https://github.com/bergcloud/devshield-raspberrypi
from bergcloud import *
import time
@nickludlam
nickludlam / gist:135820ca9d8b0ad121ea
Created May 1, 2014 11:00
The @micropython REPL help text read directly from its serial interface
Micro Python build ca045d9 on 2014-04-21; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>>
>>> help()
Welcome to Micro Python!
For online help please visit http://micropython.org/help/.
Quick overview of commands for the board:
pyb.info() -- print some general information
@nickludlam
nickludlam / gist:11229375
Created April 23, 2014 19:35
steamworks-vr-api build output
1>------ Build started: Project: vrtest_api, Configuration: Debug Win32 ------
2>------ Build started: Project: vrserver, Configuration: Debug Win32 ------
3>------ Build started: Project: vrclient, Configuration: Debug Win32 ------
4>------ Build started: Project: nointerfacedll (Test), Configuration: Debug Win32 ------
3> Running Protocol Buffer Compiler on vr_messages.proto...
1> Running VPC CRC Check - vrtest_api.vpc
2> Running Protocol Buffer Compiler on vr_messages.proto...
4> Running VPC CRC Check - nointerfacedll.vpc
4> Access is denied.
4> nointerfacedll.cpp
@nickludlam
nickludlam / gist:9689491
Created March 21, 2014 16:02
keybase.md
### Keybase proof
I hereby claim:
* I am nickludlam on github.
* I am nickludlam (https://keybase.io/nickludlam) on keybase.
* I have a public key whose fingerprint is ED5A 9CCC 0A52 8719 C186 299B 2061 AB6D 6497 9884
To claim this, I am signing this object:
@nickludlam
nickludlam / gist:6384227
Created August 29, 2013 22:33
Server time dilation monitor for Arma
/*********************************************************#
# @@ScriptName: timeDilationMonitor.sqf
# @@Author: Nick 'Bewilderbeest' Ludlam <[email protected]>
# @@Create Date: 2013-08-29 21:49:20
# @@Modify Date: 2013-08-29 23:16:00
# @@Function: Measures the server lag and presents an API to
# attempt to compensate for late timekeeping
#*********************************************************/
#define MEASURED_SLEEP_DURATION 1
@nickludlam
nickludlam / gist:6287823
Last active December 21, 2015 09:49
My mods to DynamicWeatherEffects by Engima
/* DynamicWeatherEffects.sqf version 1.01 by Engima of Ostgota Ops
* Description:
* Script that generates dynamic (random) weather. Works in single player, multiplayer (hosted and dedicated), and is JIP compatible.
* Arguments:
* [_initialFog]: Optional. Fog when mission starts. Must be between 0 and 1 where 0 = no fog, 1 = maximum fog. -1 = random fog.
* [_initialOvercast]: Optional. Overcast when mission starts. Must be between 0 and 1 where 0 = no overcast, 1 = maximum overcast. -1 = random overcast.
* [_initialRain]: Optional. Rain when mission starts. Must be between 0 and 1 where 0 = no rain, 1 = maximum rain. -1 = random rain. (Overcast must be greater than or equal to 0.75).
* [_initialWind]: Optional. Wind when mission starts. Must be an array of form [x, z], where x is one wind strength vector and z is the other. x and z must be greater than or equal to 0. [-1, -1] = random wind.
* [_debug]: Optional. true if debug text is to be shown, otherwise false.
*/
@nickludlam
nickludlam / gist:5904971
Created July 1, 2013 21:53
Fatigue system for ArmA3
#ifdef __RUNNING_FATIGUE__
private["_cumulativePlayerFatigue", "_maxEntries", "_sleepInterval", "_fatigueRecoveryLevel", "_fatigueWarningThreshold", "_fatigueExhaustionThreshold", "_extraThirstDecrement", "_tiredEffectApplied", "_exhaustedEffectApplied", "_msg"];
[] spawn {
//diag_log format ["DEBUG: Starting fatigue checks"];
// We sample every _sleepInterval, and keep _maxEntries samples in total. An average is calculated,
// and then we determine if its over _fatigueWarningLevel or _fatigueExhaustionThreshold
@nickludlam
nickludlam / install.bat
Created June 25, 2013 09:05
This script is designed to accelerate your local workflow when working on ArmA3 content via git
:: install.bat
::
:: This script has two functions, and is designed to allow easy development
:: of your ArmA3 mission from within a git repository clone
::
:: 'install.bat test' - Copies the mission to your local MPMissions folder
:: 'install.bat package' - Compiles a PBO for testing with a standlone server
::
:: Nick Ludlam 15/7/2013
@nickludlam
nickludlam / gist:4666172
Last active December 11, 2015 21:58
A section of my .profile which puts the running VM count into the prompt.
function parse_vagrant_vms {
# Use sed to strip out the whitespace, can't seem to get wc to give nice formatting standalone
# Thanks to @pkqk for showing me the speedy 'VBoxManage' command
local vm_count=$(VBoxManage list runningvms | wc -l | sed 's/^ *//; s/; */;/g')
# I use curly braces to mean vm count, edit to taste
if [ $vm_count -eq 1 ]; then
echo "{${vm_count}vm}"
fi
if [ $vm_count -gt 1 ]; then
echo "{${vm_count}vms}"