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 | |
echo "Disk size: ".disk_total_space("D:").PHP_EOL; | |
$disk = fopen('\\\\.\\D:', 'rb+'); //escaping the escape | |
$chunk_size = 4096; | |
while (!feof($disk)) { | |
$bin_data = fread($disk, 4096); |
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 | |
$is_terminal = php_sapi_name() == "cli"; | |
$td_tag_init = "\t".'<td>'; | |
$td_tag_end = '</td>'.PHP_EOL; | |
$tr_tag_init = '<tr>'.PHP_EOL; | |
$tr_tag_end = '</tr>'.PHP_EOL; | |
$to_html_init = '&#'; | |
$to_html_end = ';'; | |
$new_line_code = '<br>'.PHP_EOL; |
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
function quanto_cobrar(quanto_quero_ganhar, taxa_de_desconto) { | |
let i = 0; | |
function loop(valor) { | |
let resultado = parseFloat((valor - (valor * taxa_de_desconto)).toFixed(2)); | |
let acrescentar = parseFloat((valor - resultado).toFixed(2)); | |
if (i === 10) {return quanto_quero_ganhar + acrescentar;}i++; |
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
#!/usr/bin/env python | |
"""Prints to the screen all available and usable Python Modules (that aren't pip packages) installed | |
and display their description""" | |
import importlib | |
import os | |
import pkgutil | |
import platform | |
import re |
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
GRUB_CMDLINE_LINUX="noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mitigations=off" |
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 | |
//echo "\033[23\033[;H"; | |
require_once 'vendor/autoload.php'; | |
$struct = new \danog\PHP\StructClass(); | |
function is_little_endian() { | |
$testint = 0x00FF; | |
$p = pack('S', $testint); |
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
# suppose the main file to load is main.py and the icon file is called main.ico, the process is this: | |
python -m nuitka --enable-plugin=tk-inter --onefile --disable-console --windows-icon-from-ico=main.ico main.py | |
pyinstaller --onefile --icon=main.ico --noconsole main.py | |
cxfreeze -c main.py --icon=main.ico --base-name=Win32GUI --target-dir distcx |
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
let canvas = document.getElementById('universe').getContext('2d') | |
let atom = (x,y,c) => {canvas.fillStyle = c; canvas.fillRect(x,y,3,3)}; | |
window.CP.PenTimer.MAX_TIME_IN_LOOP_WO_EXIT = 10000; | |
for (y=1; y < 1000; y++) { | |
for (x=1; x < 1000; x++) { | |
dx = (x-500)/200 | |
dy = (y-500)/200 | |
a = dx |
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
function soma(first, second) { | |
while (second != 0) { | |
var carry = first & second; | |
first = first ^ second; | |
second = carry << 1; | |
} | |
return first; | |
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
function newName(name) { | |
return name.toLowerCase().split('').map((char) => { | |
if(['e','r','t','y','u','i','a','s','k','l','b','n','m'].find(prohibited => prohibited === char)) { | |
return null; | |
} | |
return char; | |
}).join(''); | |
} | |
console.log(newName("joãozinho da silva sauro")); |