Skip to content

Instantly share code, notes, and snippets.

View Adam-Langley's full-sized avatar
💭
compiling...

Adam Langley Adam-Langley

💭
compiling...
View GitHub Profile
@Adam-Langley
Adam-Langley / cat-by-modified-date.sh
Last active July 8, 2020 04:57
Concatenate log files, sorted by modified date
# joins all files in a folder, sorted by modified date
# into a single file, output.txt
cat $(ls -tr *.log) > output.txt
@Adam-Langley
Adam-Langley / Start Screen Recording.scpt
Last active February 15, 2018 21:39 — forked from pwc3/Start Screen Recording.scpt
Utilises the enhanced 'clickdrag.swift' that allows all inputs to be negative. Also supports capturing bezel drop-shadow.
set theProcessName to "Simulator"
set theWindowNumber to 1
-- set this to 'true' to increase the captured screen region
-- to include device bezel drop-shadow
set includeDropshadowRegion to false
tell application "System Events"
tell process theProcessName
activate
@Adam-Langley
Adam-Langley / clickdrag.swift
Last active February 15, 2018 21:35 — forked from shanecelis/clickdrag.swift
Enhanced to support negative values for all 4 inputs
#!/usr/bin/env xcrun swift
// ~/bin/clickdrag -x 10 -y 20 -dx 200 -dy 100 -negx true -negy false -negdx false -negdy false
// http://www.paulcalnan.com/archives/2014/10/quicktime-screen-recording-of-a-single-window.html
import Foundation
let kDelayUSec : useconds_t = 500_000
func DragMouse(from p0: CGPoint, to p1: CGPoint) {
let mouseDown = CGEvent.init(mouseEventSource:nil,
mouseType:.leftMouseDown,