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
| # place this in your aliases file | |
| ghcl() { | |
| prefix=$(echo -n $1 | sed 's|https://github.com/|git@github.com:|') | |
| git clone "$prefix.git" | |
| } |
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
| // ==UserScript== | |
| // @name Amp Fixer | |
| // @match https://codedrills.io/contests/icpc-gwalior-pune-2020-regional-round/scoreboard | |
| // ==/UserScript== | |
| function fixer() { | |
| const elms = document.querySelectorAll(".v-data-table__wrapper > table:nth-child(1) > tbody:nth-child(3) > tr > td:nth-child(3)"); | |
| for (const elm of [...elms]) { | |
| const s = elm.innerText; |
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 echo 'hello'; ?> |
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 | |
| echo file_get_contents("/etc/passwd"); | |
| echo "--------\n"; | |
| echo file_get_contents("/my_init"); | |
| echo "--------\n"; | |
| echo file_get_contents("/my_service"); | |
| echo "--------\n"; | |
| $inspection_dirs=array("", "tmp", "home"); |
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 vscode = require('vscode'); | |
| const pathModule = require('path'); | |
| const gitExt = vscode.extensions.getExtension('vscode.git')?.exports; | |
| const gitAPI = gitExt.getAPI(1); | |
| module.exports.macroCommands = { | |
| OpenContentScript: { | |
| no: 1, | |
| func: () => { | |
| openFile("chrome_extension/src/js/contentScript.js") |
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
| function getIframesCount(win) { | |
| let count = 1; // self frame | |
| for (let i = 0; i < win.frames.length; i++) { | |
| count += getIframesCount(win.frames[i]); | |
| } | |
| return count; | |
| } |
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
| #!/usr/bin/env python3 | |
| import re | |
| import subprocess | |
| import sys | |
| def run_command(command): | |
| """Execute a shell command and return the output.""" | |
| try: | |
| result = subprocess.run(command, shell=True, check=True, text=True, capture_output=True) | |
| return result.stdout.strip() |
OlderNewer