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
#left side with date | |
PROMPT='%{$fg[yellow]%}[%D %*] '$PROMPT | |
#left side without date | |
PROMPT='%{$fg[yellow]%}[%*] '$PROMPT | |
#right side with date | |
RPROMPT="[%D %*]" | |
#right side without date | |
RPROMPT="[%*]" |
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 | |
# Author CodeBrauer 2022 | |
export TMP=~./tmp/ | |
# thanks to: https://stackoverflow.com/a/67404585/1990745 | |
LATEST_IM_VERSION=$(curl "https://api.github.com/repos/ImageMagick/ImageMagick6/tags" | jq -r '.[0].name') | |
echo ">>> Found latest IM6 version: $LATEST_IM_VERSION"; | |
echo ">>> Start Download..." |
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
<?php | |
function get_dig($addr, $ns, $type) | |
{ | |
$addr = escapeshellarg($addr); | |
$ns = escapeshellarg($ns); | |
$type = escapeshellarg($type); | |
$cmd = "dig +short {$addr} {$type} @{$ns}"; | |
return shell_exec($cmd); | |
} |
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
{ | |
"BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut", | |
"BTTPredefinedActionType" : 172, | |
"BTTPredefinedActionName" : "Run Apple Script (blocking)", | |
"BTTInlineAppleScript" : "do shell script \"\/php \/Users\/USERNAME\/dev\/togglaudio.php\"", | |
"BTTAdditionalConfiguration" : "8519680", | |
"BTTEnabled2" : 1, | |
"BTTKeyboardShortcutKeyboardType" : 3253, | |
"BTTRepeatDelay" : 0, | |
"BTTUUID" : "E86A6EE6-0B34-4607-8D94-9AE303AF29CB", |
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
<?php | |
/** | |
* @param string $url The URL to fetch | |
* @param boolean $json if true, returns decoded json array | |
* @param boolean $show_error if true, prints curl error to screen | |
* @author CodeBrauer <https://github.com/CodeBrauer> | |
* @return string result of fetched url, false on failure | |
*/ | |
function curl_get_contents($url, $json = false, $show_error = false) { | |
if (!function_exists('curl_init')) { return file_get_contents($url); } // fallback |
Somehow the "new version" of Outlook for macOS fucked up and all "Sent" Mails we're only saved locally. And turns out, moving them to an IMAP-Folder syncs nothing. Litterly useless. To sync the missing mail to your server, this is the only way I got the mails back in my IMAP/webmail/Apple Mail.
- Create a folder on your desktop like
mails-outlook-export
- Go to the folder in "new" Outlook for Mac, which are not synced
- Mark all the mails with CMD+A
- Move all mails with drag & drop to your folder
mails-outlook-export
- Rename the folder to
mails-outlook-export.mbox
(file extension)
Masks an IBAN so that the user still recognizes you, but no one else can do anything with it.
<?php
/**
* Masks an IBAN so that the user still recognizes you, but no one else can do anything with it.
* @param string $iban the iban to mask
* @param string $mask_character character/symbol to replace
letter cases:
Identifier | Name | Example |
---|---|---|
ada |
Ada case | The_Quick_Brown_Fox |
camel |
Camel case | theQuickBrownFox |
cobol |
COBOL case | THE-QUICK-BROWN-FOX |
dot |
Dot notation | the.quick.brown.fox |
kebab |
Kebab case | the-quick-brown-fox |
lower |
Lower case | the quick brown fox |