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
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'bundler/inline' | |
gemfile do | |
source "https://rubygems.org" | |
gem "csv" |
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
{ | |
"setarea": false, | |
"count": 170, | |
"searchtext": "currentarea: category: \"Espoo Rantapuolikas\"", | |
"categories": [ | |
"Espoo Rantapuolikas" | |
], | |
"results": [ | |
{ | |
"name": "Espoo Rantapuolikas", |
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
#!/usr/bin/env bash | |
set -e -o pipefail | |
checkRequirements() { | |
requiredCommands=("jq" "xargs" "xcrun") | |
for cmd in "${requiredCommands[@]}"; do | |
if ! command -v "$cmd" &> /dev/null | |
then |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env ruby | |
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
gem "tty-logger", "~> 0.6" | |
gem "pry" | |
gem "dotiw" |
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
import Cocoa | |
import Photos | |
let original = URL(fileURLWithPath: "/Users/matt/Code/personal/PhotoKitPlayground/Test/DSC_6326.jpg") | |
let edited = URL(fileURLWithPath: "/Users/matt/Code/personal/PhotoKitPlayground/Test/DSC_6326-edit.jpg") | |
let status = PHPhotoLibrary.authorizationStatus(for: .readWrite) | |
if status != .authorized { | |
PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
function statusbarmagic() { | |
usage="Usage: statusbarmagic apply|clear|help" | |
arg="$1" | |
requirements=( xcrun jq ) | |
missing=0 | |
for c in "${requirements[@]}" | |
do | |
if ! command -v "$c" &> /dev/null | |
then |
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
# Record screen from simulator: | |
xcrun simctl io booted recordVideo appVideo.mov | |
# Full size screen recording | |
ffmpeg -i screen-recording.mp4 -i iPhone12ProOverlay.png \ | |
-filter_complex "scale=-1:2532,pad=width=3656:height=2057:x=(ow-iw)/2:y=(oh-ih)/2,overlay=x=0:y=0" \ | |
output.mp4 | |
# Screen recording resized to 1920px height | |
ffmpeg -i screen-recording.mp4 -i iPhone12ProOverlay-3656.png \ |
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
[Unit] | |
Description=Librespot | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
User=nobody | |
Group=audio | |
Restart=always | |
RestartSec=10 |
NewerOlder