This file contains 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\Resources; | |
use Illuminate\Container\Container; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
use Illuminate\Pagination\Paginator; | |
use Illuminate\Support\Collection; | |
class CollectionHelper |
This file contains 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 | |
// Don't just COPY everything to your codebase without looking the need of these functions. | |
// Helpers functions can be a cancer if you don't have any idea where to put and why. | |
const DS = DIRECTORY_SEPARATOR; | |
function echoln($str) { | |
echo $str . PHP_EOL; | |
} |
This file contains 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 sh | |
# The FPM ini file, and not the CLI one | |
ini_file=$(php -i | grep "Loaded Configuration File" | awk -F ' => ' '{print $2}' | sed 's/cli/fpm/g') | |
echo $ini_file | |
sudo sed -i 's/memory_limit\s*=.*/memory_limit = 256M/g' $ini_file | |
cat $ini_file | grep memory_limit | |
sudo sed -i 's/upload_max_filesize\s*=.*/upload_max_filesize = 3G/g' $ini_file |
This file contains 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/sh | |
uname -a; | |
lsb_release -a; | |
php --version; | |
mysql --version; | |
composer --version; | |
echo nodejs $(node --version); | |
echo npm $(npm --version); | |
openssl version; | |
ssh -V; |
This file contains 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
' Solicita ao usuário a URL | |
url = InputBox("Insira a URL da página:", "Capturar POST ID") | |
' Verifica se a URL foi inserida | |
If url <> "" Then | |
' Cria o objeto para fazer a requisição HTTP | |
Set http = CreateObject("MSXML2.ServerXMLHTTP.6.0") | |
On Error Resume Next | |
' Faz a requisição GET |
This file contains 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
$url = $args[0] | |
try { | |
$response = Invoke-WebRequest -Uri $url | |
} catch { | |
Write-Output $_.Exception | |
if ($_.Exception.Response.StatusCode -eq "404") { | |
Write-Host "Error: Page does not exist" | |
} else { | |
Write-Host "Error: Page could not be processed" -ForegroundColor red -BackgroundColor black |
This file contains 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 | |
$mail_to = filter_input(INPUT_POST, 'to', FILTER_VALIDATE_EMAIL); | |
$mail_subject = filter_input(INPUT_POST, 'subject', FILTER_SANITIZE_STRING); | |
$mail_message = filter_input(INPUT_POST, 'message'); // user can send HTML here | |
$from_name = 'Your Name'; | |
$from_mail = '[email protected]'; | |
if (!$mail_to || !$mail_subject || !$mail_message) { | |
die('Invalid data! Must contain a TO, SUBJECT and a MESSAGE at least'); |
This file contains 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
# GTA San Andreas Terremoth Master Save | |
- [x] without die | |
- [x] without being arrested | |
- [x] no cheats used | |
- [x] maximum lung capacity | |
- [x] maximum stamina | |
- [x] maximum muscle | |
- [ ] maximum respect |
This file contains 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 | |
$stdin = fopen('php://stdin', 'r'); | |
system('stty cbreak -echo'); | |
stream_set_blocking($stdin, false); | |
while (1) { | |
if ($keypress = fgets($stdin)) { |
This file contains 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
/* | |
MIT License | |
Copyright (c) 2024 Terremoth (github.com/terremoth) | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
NewerOlder