Discover gists
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=Syncthing | |
[Service] | |
Type=simple | |
ExecStart=flatpak run --command=syncthing me.kozec.syncthingtk | |
Restart=on-failure | |
RestartSec=1 | |
SuccessExitStatus=3 4 |
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
(defun run-vim () | |
(interactive) | |
(eshell) | |
(switch-to-buffer "*eshell*") | |
(insert "vi") | |
(eshell-send-input)) |
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
async function readRequestBody(request) { | |
const { headers } = request; | |
const contentType = headers.get('content-type') || ''; | |
if (contentType.includes('application/json')) { | |
return JSON.stringify(await request.json()); | |
} else if (contentType.includes('form')) { | |
const formData = await request.formData(); | |
const body = {}; | |
for (const entry of formData.entries()) { | |
body[entry[0]] = entry[1]; |
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
#!/bin/bash | |
# macOS Automator script to rename photos/videos based on creation date | |
# Blog post: https://paulgalow.com/macos-quick-action-rename-photos-videos-timestamp | |
export PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
# Create subfolder to store renamed files | |
createDestination() { | |
readonly destination="$(dirname "$file")/sorted" |
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/local/bin/python3 | |
import os | |
from PIL import Image | |
from hachoir.parser import createParser | |
from hachoir.metadata import extractMetadata | |
# Parameters | |
dir = '/path/to/media/files' | |
image_extensions = ['.jpg'] | |
video_extensions = ['.mp4'] |
People
:bowtie: |
π :smile: |
π :laughing: |
---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
This guide is for UEFI-GPT Windows installs. Microsoft's bcdboot
utility can recreate the bootloader on any selected partition quite easily, and it won't break any existing EFI entries (unlike the bootrec /fixmbr on MBR installs).
This process can be done on a working Windows install, or on the Windows Installer. To access the Command Promt on the Windows Installer, press ShiftF10 after the Windows Setup window appears, or click Next > Repair your computer.
You can do this with Disk Managment as well, if you can boot the installed Windows.
Enter diskpart
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
i | |
me | |
my | |
myself | |
we | |
our | |
ours | |
ourselves | |
you | |
your |
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
# openshift cli tool `oc` will be needed, and you must login | |
# https://github.com/openshift/origin/releases | |
# install socat on the mac | |
brew install socat | |
# alias localhost to give local containers an address for the host network | |
sudo ifconfig lo0 alias 172.16.123.1 | |
# start the container in openshift |
NewerOlder