Skip to content

Instantly share code, notes, and snippets.

View supermarsx's full-sized avatar

supermarsx

  • Portugal
  • 10:21 (UTC +01:00)
View GitHub Profile
@supermarsx
supermarsx / freeusedspace.sh
Created May 24, 2024 10:57
Cheat sheet, free/used space linux by folder/mount points
# free space mount points
df -h /
# used space folders
du -sh *
# used space process locked files
lsof +L1
# used space by files in folder
ls -lah
@supermarsx
supermarsx / EditTextCommand.reg
Created April 28, 2024 22:23
Regedit Edit shell command
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ODCfile\shell\EditText\command]
@="\"C:\\Program Files (x86)\\Microsoft Office\\root\\client\\appvlp.exe\" NOTEPAD.EXE \"%1\""
@supermarsx
supermarsx / FindSuitableNumber.au3
Created April 28, 2024 22:22
Find a suitable divisible number with AutoIt
Global $rangeMin = 2500, _
$rangeMax = 5000, _
$divMin = 2, _
$divMax = 10
Func isDivisible($dividend, $divisor)
$isDivisible = Not(IsFloat($dividend / $divisor))
Return $isDivisible
EndFunc
@supermarsx
supermarsx / BasicComingSoon.html
Created April 28, 2024 21:03
Basic coming soon page
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width">
<title>euroreale</title>
<meta name="description" content="euroreale">
<style type="text/css">
@supermarsx
supermarsx / UglyYellowComingSoon.html
Created April 28, 2024 21:02
Ugly yellow coming soon page example
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width">
<title>.senciente</title>
<meta name="description" content="euroreale">
<style type="text/css">
html {
background-color: yellow;
@supermarsx
supermarsx / wp_error.php
Created April 28, 2024 19:57
Set Wordpress error reporting
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
@supermarsx
supermarsx / phpMailExample.php
Created April 28, 2024 19:55
PHP mail example
<?php
date_default_timezone_set($timezone);
$timezone = 'Europe/Lisbon';
$timeformat = 'd/m/Y h:i:s a';
$date = date($timeformat, time());
$number = wordwrap($argv[1], 30);
$charLimit = 500;
@supermarsx
supermarsx / dovecot.conf
Created April 28, 2024 19:39
Dovecot configuration file example
## Dovecot configuration file
# If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration
# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.
# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, put the
# value inside quotes, eg.: key = "# char and trailing whitespace "
@supermarsx
supermarsx / fpm-pool.conf
Created April 28, 2024 19:38
PHP FPM conf example
[global]
; Log to stderr
error_log = /dev/stderr
[www]
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
; a specific port;
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
@supermarsx
supermarsx / DismVirtualizationStuffToggles.bat
Created April 28, 2024 19:34
DISM Hyper-V, Containers and Sandbox related feature toggles
Dism /online /Disable-Feature /FeatureName:Containers-DisposableClientVM /Remove /NoRestart
Dism /online /Disable-Feature /FeatureName:Containers /Remove /NoRestart
Dism /online /Disable-Feature /FeatureName:Microsoft-Hyper-V-All /Remove /NoRestart
Dism /online /Disable-Feature /FeatureName:Microsoft-Hyper-V-Tools-All /Remove /NoRestart
Dism /online /Disable-Feature /FeatureName:VirtualMachinePlatform /Remove /NoRestart
Dism /online /Disable-Feature /FeatureName:HypervisorPlatform /Remove /NoRestart
Dism /online /Enable-Feature /FeatureName:Containers-DisposableClientVM /NoRestart
Dism /online /Enable-Feature /FeatureName:Containers /NoRestart
Dism /online /Enable-Feature /FeatureName:Microsoft-Hyper-V-All /NoRestart