Skip to content

Instantly share code, notes, and snippets.

@Gavriel770U
Gavriel770U / create_file.asm
Created March 11, 2024 22:00
Function to create new file in x86 .asm for DOS
proc create_file
; [bp+4] offset file_name
; [bp+6] offset file_handle
; [bp+8] offset error_message
; [bp+10] file attributes [value]
push bp
mov bp, sp
push ax
push bx
@Gavriel770U
Gavriel770U / file_creations.sh
Created February 26, 2024 20:55
Linux Terminal Creating New File
#!/bin/bash
touch way1.txt
echo "This is the second way!" > way2.txt
> way3.txt
printf "This is the fourth way!\n" > way4.txt
>> way5.txt
# The sixth way is made if way 5 is too much like way 3,
# But you have to insert some data and then press CTRL+C to write to the file and save it.
cat > way6.txt
@Gavriel770U
Gavriel770U / settime.bat
Last active March 14, 2024 17:14
`.bat` file that synchronizes your timezone with your computers time. Often used because of the time error of switching from OS to OS.
@echo off
REM --> Check for permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
REM --> If error flag set, we do not have admin.