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 | |
| # Define usage function | |
| usage() { | |
| echo "Usage: $0 {backup|restore} -v <volume_name> -f <file_path>" | |
| echo "Options:" | |
| echo " backup: Back up the specified Docker volume to a tarball." | |
| echo " restore: Restore a Docker volume from a tarball." | |
| echo " -v <volume_name>: Name of the Docker volume." | |
| echo " -f <file_path>: Path to the tarball file." |
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 | |
| # PHP Version Switcher for shivammathur/homebrew-php | |
| # Author: Fahrur Rifai | |
| # Usage: ./sphp.sh <version> [variant] | |
| # Example: ./sphp.sh 8.2 | |
| # Example: ./sphp.sh 8.2 zts | |
| # Example: ./sphp.sh 8.2 debug | |
| set -e |
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 | |
| set -euo pipefail | |
| # Include color configuration (optional) | |
| source ~/.fay/colors 2>/dev/null || true | |
| function _docker_snippet_help() { | |
| printf "${BBlue}╔══════════════════════════════════════════════════════════╗${Color_Off}\n" | |
| printf "${BBlue}║ ${BYellow}Docker Build & Push Helper v1.1${BBlue} ║${Color_Off}\n" |
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
| ngrok config add-authtoken 2Sh58U4OUteeyVMXUpnGviJpws3_5NWWiG6Z4r5bmVdTWCRAL |
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
| -- create schema | |
| CREATE TABLE users ( | |
| id int not null primary key auto_increment, | |
| name varchar(50) not null, | |
| parent_id int null default null | |
| ); | |
| -- insert data | |
| INSERT INTO users (id, name, parent_id) VALUES | |
| (1, 'Zaki', 2), |
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
| const solve = (words) => { | |
| const result = {} | |
| for (word of words) { | |
| const key = word.split('').sort().join('') | |
| if (typeof result[key] === 'undefined'){ | |
| result[key] = [] | |
| } | |
| result[key].push(word) | |
| } | |
| return Object.values(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
| <input type="text" id="filter" value="$"><pre id="display"></pre><style>#filter{padding:10px;width:400px;font-family:monospace}#display{background-color:#ccc;border-radius:1rem;padding:10px;min-height:50px}.error{background-color:#ffcdd2 !important;color:#6f0404 !important}</style> <script src="https://unpkg.com/jsonpath@1.0.2/./jsonpath.js"></script> <script>pm.getData((err,val)=>{const json=val.response;const findJSON=()=>{try{const filtered=jsonpath.query(json,document.querySelector('#filter').value);document.querySelector('#display').classList.remove('error');document.querySelector('#display').innerHTML=JSON.stringify(filtered,null," ");}catch(err){document.querySelector('#display').classList.add('error');document.querySelector('#display').innerHTML=err.message;}};document.querySelector('#filter').addEventListener('keyup',findJSON);findJSON();})</script> |
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
| module.exports = { | |
| env: { | |
| es6: true, | |
| node: true, | |
| }, | |
| extends: [ | |
| 'airbnb-base' | |
| ], | |
| plugins: [ | |
| ], |
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 java.util.Scanner; | |
| class SimpleHeap { | |
| public static Scanner scanner = new Scanner(System.in); | |
| public static String menu = "0"; | |
| public static int N = 5; | |
| public static BaseData awal; | |
| public static BaseData akhir; | |
| public static void inisialisasiSenaraiKosong() { | |
| BaseData data1 = new BaseData(); |
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 java.util.Scanner; | |
| class simpul { | |
| // bagian deklarasi struktur record ---------------------------------- | |
| String nama; | |
| String alamat; | |
| int umur; | |
| char jekel; | |
| String hobi[] = new String[3]; | |
| float ipk; | |
| simpul kiri; |
NewerOlder