- Bit smallest computational unit, only use two values.
(ex: 0 or 1)
- Byte composed of 8 bits, enough to show a simple and unique character.
ASCII
1 Kilobit | 1000 bits |
---|---|
1 Megabit | 1000 Kilobits |
1 Gigabit | 1000 Megabits |
import sys, itertools | |
try: | |
file1, file2 = open(sys.argv[1], 'r').readlines(), open(sys.argv[2], 'r').readlines() | |
[sys.stdout.write(l1.replace('\n', '') + l2.replace('\n', '')) for (l1,l2) in itertools.zip_longest(file1, file2, fillvalue='')] | |
except: | |
sys.stderr.write('[!] Error: require two valid files!') |
mysqldump -u <username> -p<password> -T . <database> --fields-terminated-by '\t' --fields-escaped-by '\' |
UPDATE page SET slug = regexp_replace(title, '[^a-z]+', '-', 'g'); |
function bubble_sort(dict $array): string { | |
$start = microtime(true); | |
do | |
{ | |
$sw = false; | |
for($i = 0, $size = count($array) - 1; $i < $size; $i++) | |
{ | |
if( $array[$i] > $array[$i + 1] ) | |
{ | |
$aux = $array[$i + 1]; |
#!/usr/bin/env bash | |
if [ `whoami` != 'root' ] | |
then | |
echo "[!] Error: requires root!"; | |
exit; | |
fi | |
echo " * Clearing ram PageCache"; | |
sync; | |
echo 1 > /proc/sys/vm/drop_caches; |
#include <stdio.h> | |
const char* tni(); | |
const char* tnf(); | |
#define typename(T) ((_Generic((T), int: tni, float: tnf))()) | |
int main() | |
{ | |
int foo; |
wget \ | |
--recursive \ | |
--no-clobber \ | |
--page-requisites \ | |
--html-extension \ | |
--convert-links \ | |
--restrict-file-names=windows \ | |
--domains example.com \ | |
--no-parent \ | |
example.com/site/home |
du -bsh * > big_folders.txt & |
document.addEventListener("DOMContentLoaded", () => { | |
const elements = document.querySelectorAll('.animate-number'); | |
const lerp = (start, end, amt) => Math.round((1-amt)*start+amt*end); | |
const interval = 10; | |
const amount = 0.03; | |
const increment = (el) => { | |
el.setAttribute('data-now', lerp(el.getAttribute('data-now'), el.getAttribute('data-end'), amount)); | |
el.innerText = Number(el.getAttribute('data-now')).toLocaleString(); |