- Apache:
https://httpd.apache.org/docs/current/mod/mod_rewrite.html
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
| // https://tryhackme.com/room/cryptographybasics | |
| #include <stdio.h> | |
| #include <ctype.h> | |
| void encrypt(char msg[]) { | |
| int rot = 0; | |
| printf("Rot: "); | |
| scanf("%d", &rot); |
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
| /** | |
| * @file automaton.cpp | |
| * @author dantsec (dantsec@proton.me) | |
| * @brief A simple implementation of a 1D cellular automaton, based on ECA (Elementary Cellular Automata). | |
| * @version 0.1 | |
| * @date 2025-06-30 | |
| * | |
| * @copyright dantsec (c) 2025 | |
| * | |
| * % g++ -std=c++11 -O2 -Wall automaton.cpp -o automaton && ./automaton 50 10 30 < in.txt |
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\Http\Traits; | |
| trait ArrayOperationsTrait | |
| { | |
| /** | |
| * Recursively computes the difference between two arrays. | |
| * | |
| * This method compares the first array ($arr1) with the second array ($arr2) and returns |
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 time | |
| """ | |
| Given the relation: | |
| X0 = "Seed" (Important to have a source that garantee it'll be most random possible) | |
| Xn = (A * Xn-1 + B) mod Y | |
| Were: | |
| A and B might have random source as seed (like atmospheric noises or system date) | |
| Y are our delimiter, and generates X in range [0, Y - 1] |
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
| // Imports | |
| const express = require('express'); | |
| const app = express(); | |
| const tokenUtil = require('./src/utils/Token'); | |
| const crypto = require('crypto'); | |
| // Constants | |
| const accessSecret = 'ACCESS_SECRET_KEY'; | |
| const refreshSecret = 'REFRESH_SECRET_KEY'; | |
| const validLogin = { |
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
| " Disable compatibility with vi which can cause unexpected issues. | |
| set nocompatible | |
| " Enable type file detection. Vim will be able to try to detect the type of file in use. | |
| filetype on | |
| " Enable plugins and load plugin for the detected file type. | |
| filetype plugin on | |
| " Load an indent file for the detected file type. |
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\Facades\DB; | |
| class ConvertImagesToWebp extends Command | |
| { | |
| /** |
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 | |
| /** | |
| * Does indeed merge arrays, but it converts values with duplicate keys to arrays | |
| * rather than overwriting the value in the first array with the duplicate | |
| * value in the second array, as array_merge does. | |
| * | |
| * @param array $leftArray | |
| * @param array $rightArray | |
| * |
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
| /* | |
| gcc morse_encode.c -o morse && ./morse | |
| */ | |
| #include <stdio.h> | |
| #define ALPHABET_TOTAL_LETTERS (26) | |
| #define ALPHABET_LINE_SIZE (10) | |
| const char ALPHABET[ALPHABET_TOTAL_LETTERS][ALPHABET_LINE_SIZE] = { |
NewerOlder