Skip to content

Instantly share code, notes, and snippets.

View JonathanTurnock's full-sized avatar

Jonathan Turnock JonathanTurnock

View GitHub Profile
@JonathanTurnock
JonathanTurnock / README.md
Last active March 7, 2021 12:58
VLC media player Convert & Save DVD Chapters

Intro

How to use VLC media player to export a DVD in a file per chapter format

The command for reference is:

vlc dvdsimple:///G:/#1:1-1:1 --sout "#standard{access=file,mux=ts,dst=T1_CH1.mpg} vlc://quit"

The important part is the addition of a "to" section that the GUI does not allow.

@JonathanTurnock
JonathanTurnock / App.tsx
Created January 11, 2021 19:01
CSS Grid Example
import React from "react";
import styled from "styled-components";
const Scene = styled.div`
flex: auto;
display: grid;
grid-template-rows: 48px auto;
overflow: hidden;
& > div,
@JonathanTurnock
JonathanTurnock / RandomPatrol.md
Last active December 1, 2020 22:45
Arma 3 Cheatsheet

Initiate Random Patrol

Add the following to the init field of the Team Leader.

To ensure the units start from a random location, update the groups placement radius to match the distance field

[group this, getPos this, 1000] call BIS_fnc_taskPatrol;
@JonathanTurnock
JonathanTurnock / README.md
Created October 19, 2020 09:53
Get Current Jenkins Git Commit Hash

To Display the current git commit hash execute the following snipped:

git rev-parse --short HEAD

To Extract this to use in a Jenkinsfile use the sh function with the script and returnStdout parameter set to true:

def commitHash = sh(script: 'git rev-parse --short HEAD', returnStdout: true)
@JonathanTurnock
JonathanTurnock / Movement.cs
Created May 16, 2020 16:57
Simple Vector2 Movement BaseClass
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour
{
[SerializeField] public float speed = 1f;
private List<Transform> waypoints = new List<Transform>();
@JonathanTurnock
JonathanTurnock / python-selenium-json_placeholder.py
Created December 22, 2019 21:52
Python Selenium Json Placeholder Interaction
import time
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.chrome.options import Options
if __name__ == '__main__':
# 1. Optional Options (Useful for development testing)
options = Options()
options.add_argument("--disable-web-security")