Skip to content

Instantly share code, notes, and snippets.

@jake-lewis
jake-lewis / config.json
Created October 27, 2021 15:22
Config example
"7": [
{
"color": "004000",
"trigger": {
"id": "FLP_LG_FULL_FLAPS_LT",
"value": 1,
"comparator": "EqualTo"
},
"priority": 2
},
@jake-lewis
jake-lewis / gist:e89207690cbc777fa82e9ae248b683ab
Last active January 21, 2024 13:36
freePIE mouse as joystick

Installation

  1. Install vJoy
  2. Install freePIE
  3. In freePIE: new file -> copy script below -> save as'BLAH'
  4. Run script (F5)
  5. Launch DCS (on my machine has to be after a joystick is added, but you'll probably be fine running dcs first)
  6. Settings -> Controls -> Select Su-25T (or any module) -> Select 'Axis Commands' in category dropdown
  7. Bind pitch and Roll (can double click on field in vJoy Device column) to JOY_X, JOY_Y respectively
  8. Click OK (I cannot state how many times I quit accidentally and lost ~15mins worth of keybinds)
@jake-lewis
jake-lewis / CodeTest.java
Last active May 14, 2019 13:21
Adjacent Coin Flip problem
// Fix the bugs, only change 3 lines, no additions or deletions of whole lines
// Takes an array of 0's & 1's, i.e. [0, 1, 0, 1, 1], arrays sized 1 - 100
// Imagine there is a row of coins on a tables, either heads or tails up, represented by 0 or 1
// Code calculates the maximum number of adjacent heads or tails AFTER one of the coins has been flipped
// e.g.
// [0, 1, 1, 0] would return 2
// [0, 1, 1, 0, 0, 0, 1] would return 4
class Solution {
import java.util.Collection;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
public class Main {
public static void main(String[] args) {
import com.logdyn.controllers.RepositoryController;
import com.logdyn.model.Task;
import com.logdyn.model.Timer;
import com.logdyn.model.WorkLog;
import com.logdyn.model.auth.BasicAuthenticator;
import java.net.URL;
import java.util.Optional;
class Scratch {
@jake-lewis
jake-lewis / cloudSettings
Created August 15, 2018 19:19
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-08-15T18:19:37.406Z","extensionVersion":"v3.0.0"}
npm install express-generator -g
express --view=pug express-pug-generated
cd express-pug-generated/
code package.json
# Add the following two properties:
# "bin": "bin/www",
# "pkg": {
# "assets":
# [