Skip to content

Instantly share code, notes, and snippets.

View DATADEER's full-sized avatar
💭
Be useful on the internet

Lucca Sanwald DATADEER

💭
Be useful on the internet
View GitHub Profile
@DATADEER
DATADEER / open llamalife
Created January 25, 2023 16:25
open llamalife
tell application "Finder"
set _bounds to bounds of window of desktop
set _height to item 4 of _bounds
end tell
tell application "Safari"
make new document at end of documents with properties {URL:"https://llamalife.co/tasks"}
set bounds of front window to {0, 0, 300, _height}
end tell
@DATADEER
DATADEER / Editor Config Changes Godot on Restart
Last active January 8, 2023 15:32
This is how the editor config changes on macos after setting the keyboard shortcut for "Project" to F5
[gd_resource type="EditorSettings" load_steps=7 format=3]
[sub_resource type="InputEventKey" id="InputEventKey_royfo"]
physical_keycode = 84
[sub_resource type="InputEventKey" id="InputEventKey_4gnok"]
meta_pressed = true
physical_keycode = 84
[sub_resource type="InputEventKey" id="InputEventKey_xxe3q"]
@DATADEER
DATADEER / Force Godot Docs to Godot 4 and english
Last active December 23, 2022 07:57
Redirects all requests to godot docs to the english / latest version (Godot 4)
// ==UserScript==
// @name Force Godot Docs to latest english
// @namespace http://tampermonkey.net/
// @version 0.1
// @description When opening the godot docs, always show the page in english and the latest version
// @author DATADEER
// @match https://docs.godotengine.org/*
// @icon https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Godot_icon.svg/2048px-Godot_icon.svg.png
// @grant none
// ==/UserScript==
{
"title": "SHIFT ARROWS",
"rules": [
{
"description": "SHIFT LEFT_ARROW",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
{
"title": "OPTION ARROWS",
"rules": [
{
"description": "OPTION LEFT_ARROW",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
{
"title": "COMMAND ARROWS",
"rules": [
{
"description": "COMMAND LEFT_ARROW",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {
{
"%%true": {
"%function": {
"name": "canReadWritePartition",
"arguments": [
"%%partition"
]
}
}
}
@DATADEER
DATADEER / lock_pdf.sh
Last active November 24, 2020 12:52
Locks a pdf with a custom (owner) password via pdftk. ONLY LOCKS EDITING.
#!/bin/sh
# Locks a pdf with a custom password via pdftk.
# ONLY LOCKS EDITING. CAN STILL BE OPENEND WITHOUT PASSWORD
# HOW TO:
# pdftk has to be globally accessible. https://www.pdflabs.com/
# run sh lock.sh [filename_without_filetype] [password]
filename=$1
password=$2
echo locking "$filename".pdf &&
# parses and sums up durations of each episode from the designacademy.io course
# paste into console on https://www.designacademy.io/lesson/welcome-to-the-course/
Array.from(document.querySelectorAll('.note'))
.map((elem) => elem.innerText)
.map((text) => text.split('|')[1])
.filter((exists)=>exists)
.map((text)=> text.trim().split(':')
.map((number) => parseInt(number))
.reduce((acc,curr,i)=>i===0 ? acc + (curr * 60): acc + curr ,0))
@DATADEER
DATADEER / arrows_mod.json
Last active August 7, 2022 20:09
Map FN + E,S,D,F TO ARROW_UP,ARROW_LEFT,ARROW_DOWN,ARROW_RIGHT in Karabiner Elements
{
"title": "ARROWS",
"rules": [
{
"description": "LEFT_ARROW",
"manipulators": [
{
"type": "basic",
"from": {
"modifiers": {