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_action( 'wp_enqueue_scripts', 'my_custom_script_load' ); | |
| function my_custom_script_load(){ | |
| wp_enqueue_script( 'my-custom-script', get_stylesheet_directory_uri() . '/custom-scripts', array( 'jquery' ) ); | |
| } |
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
| // on Tests tab, enter these | |
| var jsonData = pm.response.json(); | |
| if (jsonData["response_field_key"]) | |
| pm.environment.set("ENV_VARIABLE_KEY", jsonData.access_token); |
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
| gcloud compute disks create [new disk name] --source-snapshot [use full url of the said snapshot] |
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
| adb shell setprop debug.layout true && adb shell service check SurfaceFlinger |
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
| git branch -v -a | grep {search string} |
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 | |
| int_handler() | |
| { | |
| echo "Interrupted." | |
| # Kill the parent process of the script. | |
| kill $PPID | |
| exit 1 | |
| } | |
| trap 'int_handler' INT |
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
| import sys | |
| from watchdog.observers import Observer | |
| from watchdog.events import FileSystemEventHandler | |
| import time | |
| class EventHandler(FileSystemEventHandler): | |
| def on_any_event(self, event): | |
| print("EVENT") | |
| print(event.event_type) | |
| print(event.src_path) |
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
| { command } | xclip -selection c | |
| # e.g. | |
| # pwd | xclip -selection c | |
| # from https://stackoverflow.com/a/4208191/4895040 |
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
| # get port | |
| > sudo lsof -t -i:5000 | |
| {PORT} | |
| > | |
| # kill using the port | |
| > sudo kill -9 {PORT} | |
| # recheck (should output nothing) | |
| > sudo lsof -t -i:5000 |
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
| From https://github.com/fish-shell/fish-shell/issues/527#issuecomment-32237807 | |
| set --universal fish_user_paths $fish_user_paths ~/path/name |