Skip to content

Instantly share code, notes, and snippets.

@scriptdev
scriptdev / .php
Last active April 19, 2024 13:59
VALOR POR EXTENSO
<?php
# EXEMPLO DE USO:
$valor_extenso = Funcao::numeroPorExtenso(2450.20);
echo $valor_extenso;
# RETORNO: Dois mil e quatrocentos e cinquenta reais e vinte centavos
class Funcao
{
public static function numeroPorExtenso( $valor = 0, $moeda = false, $bolPalavraFeminina = false )
@lopspower
lopspower / README.md
Last active April 19, 2024 13:59
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@scriptdev
scriptdev / .php
Last active April 19, 2024 13:57
CLASSE DE DEBUG
<?php
class Debug extends TPage
{
public function x($codigo = null)
{
print("<pre>".print_r($codigo, true)."</pre>");
exit;
}
}
@revermax
revermax / .php
Created December 27, 2022 16:25 — forked from scriptdev/.php
IMPORTAÇÃO DA PLANILHA EXCEL "xls" (SimpleXLSX)
<?php
# PRIMEIRO, INSTALE VIA COMPOSER: shuchkin/simplexlsx
# DEPOIS FAÇA A REFERẼNCIA DA CLASSE CONTROLLER ONDE VOCÊ DESEJA USAR A BIBLIOTECA:
use Shuchkin\SimpleXLSX;
class ImportacaoExcel extends TPage
{
@dpaluy
dpaluy / README.md
Last active April 19, 2024 13:55
Download view only protected PDF from Google Drive

Step by step guide to downloading protected PDF from Google Drive

  1. Open the document in Google Docs
  2. Scroll to the bottom of the document, so all the pages are present
  3. Open Developer Tools on separate window and choose the Console tab
  4. Paste the code
  5. Have fun!
@surpher
surpher / rust_to_swift.md
Last active April 19, 2024 13:55
Building binaries from Rust to iOS/macOS (PactSwift specific)
@speediegq
speediegq / transmac reset.txt
Last active April 19, 2024 13:55
Reset TransMac Trial back to 15 days (Unpatchable)
Run this whenever you want or put it in your startup folder
(Win+R and type shell:startup)
For all other users, one time easy way to do it, open Regedit. Then navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved or paste that in the address bar. Select the key with a bunch of random numbers and delete all the values inside of it.
@SteveJonesDev
SteveJonesDev / accessible-menu.php
Last active April 19, 2024 13:55
Accessible WordPress Navigation Menu
<div class="menu-container">
<button class="menu-button" aria-expanded="false" aria-controls="site-header-menu" aria-label="<?php esc_attr_e( 'Menu', 'textdomain' ); ?>"></button>
<div id="site-header-menu" class="site-header-menu">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container' => 'nav',
'container_class' => 'main-navigation',
'container_id' => 'site-navigation',
@sualeh
sualeh / README.md
Last active April 19, 2024 13:54
Create Nice-looking Schema Diagrams in PlantUML

Create Nice-looking Schema Diagrams in PlantUML

PlantUML is a descriptive language to generate a number of types of software diagrams, such as sequence, class, deployment and state diagrams, and many others. PlantUML does not generate very good-looking schema diagrams out of the box, but it supports themes and preprocessed macros. If you use themes and macros, you can not only use a simplified syntax, but also generate beautiful diagrams.

Here is an example of a PlantUML schema diagram, and we will build up the code to generate it.

Schema diagram

To start, describe your schemas, tables and columns using this syntax as an example.

@QuanTrieuPCYT
QuanTrieuPCYT / securebootsign.sh
Last active April 19, 2024 13:53
Debian Linux Manual Secure Boot signing script
#!/usr/bin/env bash
# DPKG Post-Install Script to sign vmlinuz kernel images and EFI executable binaries for Secure Booting with custom certificates
# Required for full OpenCore Secure Boot (for example: you want to use Secure Boot in Windows 11 for Valorant, just like me!)
#
# Requirement:
# - You have followed this guide: https://github.com/perez987/OpenCore-and-UEFI-Secure-Boot
# - Custom ISK.key and ISK.pem in a folder of choice, I will just name it /path/to/securebootkeys as in this script
# - You are running Debian Linux, with `sbsigntool` installed (`sudo apt install sbsigntool --no-install-recommends -y`)
# - Have a brain