This file contains hidden or 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
//$parameters.RootId should point to a "Root" container that wraps the entire WebBlock | |
var wbElement = document.getElementById($parameters.RootId).parentElement; | |
//Replace "OnParametersChanged" with whatever action you want to have run when | |
wbElement.reload = $actions.OnParametersChanged; // Note the lack of ()s, point to function, not result. |
This file contains hidden or 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 | |
/* | |
* Text Field Limit Macro | |
* Implementation of Str::limit Helper. | |
* Truncates a string after $limit characters and adds $end | |
* Can be added to NovaServiceProvider in boot() | |
*/ | |
\Laravel\Nova\Fields\Text::macro('limit', function ($limit = 50, $end = '...') { | |
$this->displayUsing( |
This file contains hidden or 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
Show hidden characters
// Settings.json | |
{ | |
// ... | |
"window.autoDetectColorScheme": true, | |
"workbench.preferredDarkColorTheme": "Dracula Pro", // Dark Theme | |
"workbench.preferredLightColorTheme": "Atom One Light", // Light Theme | |
// ... | |
} |
This file contains hidden or 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
/* | |
* Mark all the topics visual on a Twitter page as "not interested". | |
* Someday maybe I'll reach the end. | |
* | |
* Currently I run from the console, will eventually write an extension. | |
*/ | |
// From your feed | |
document | |
.querySelectorAll('[aria-label="Set as not interested"]') |
This file contains hidden or 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
void main() { | |
print(1 / 0); | |
print(0 / 0); | |
} |
This file contains hidden or 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
# Add notes.md to global .gitignore at ~/.gitignore | |
NOTES_DIR=~/Notes/Repos # Update to global note directory | |
mknotes() { | |
if test -f "./notes.md"; then | |
echo 'notes.md already exists in this directory' | |
return 1 | |
fi |
This file contains hidden or 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
void main() { | |
print(_map('')); | |
print(_map('something')); | |
} | |
_map(String routingNumber) { | |
return { | |
if(routingNumber != '') 'routingNumber': routingNumber, | |
}; |
This file contains hidden or 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
# Undoes all WIP commits, will stop at last non-wip commit. | |
unwip () { | |
lastCommit=$(git log -1 --pretty=%B | cat) | |
if [ ${lastCommit:l} != "wip" ]; then | |
echo "Last commit is not a WIP." | |
else | |
count=0 | |
while [ ${lastCommit:l} = "wip" ] | |
do |
This file contains hidden or 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 | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Collection; | |
use Illuminate\Support\Str; | |
use ReflectionClass; | |
use Symfony\Component\Process\Process; |
This file contains hidden or 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 | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Open Slack | |
# @raycast.mode silent | |
# Optional parameters: | |
# @raycast.icon /Applications/Slack.app/Contents/Resources/electron.icns |