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 python3 | |
import os | |
import sys | |
PROGNAME = os.path.basename(__file__) | |
EXCLUDE_PATHS = [ | |
"/proc", |
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 python3 | |
import os | |
import sys | |
PROGNAME = os.path.basename(__file__) | |
EXCLUDE_PATHS = [ | |
"/proc", |
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
import json | |
import sys | |
def serialize(json_data, json_filename): | |
try: | |
json_string = json.dumps(json_data, sort_keys=True, indent=4) | |
fd = open(json_filename, "w") | |
fd.write(json_string) |
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 python3 | |
import ipaddress | |
import tkinter | |
import tkinter.ttk | |
import tkinter.messagebox | |
import sys | |
def bin2dec(value): |
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
// COMPILE: gcc -std=c11 -Wall -Wextra c_string_trim.c -o string_trim | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <string.h> | |
char * string_trim(char * string) { | |
int s_size = strlen(string); |
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
/** | |
* Compile: | |
* gcc -Wall -Wextra -ggdb c_string_to_int.c -o string_to_int | |
*/ | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int string_to_int(const char * string, int * retval) { |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MAX_BUF 128 | |
int string_append(char * buffer, size_t buffer_size, const char * string) { | |
size_t buffer_len = strlen(buffer); | |
size_t free_size = buffer_size - buffer_len; | |
size_t string_len = strlen(string); |
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
deb http://deb.debian.org/debian bullseye main contrib non-free | |
deb-src http://deb.debian.org/debian bullseye main contrib non-free | |
deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free | |
deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free | |
deb http://deb.debian.org/debian bullseye-updates main contrib non-free | |
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free |
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 python3 | |
""" | |
Author: gustavorv86 | |
Usage: Copy this script into the folder with the JPG files and execute it. | |
""" | |
try: | |
import os | |
import shutil | |
import sys |
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 python3 | |
def colors_16(): | |
print("\n\n8/16 COLORS\n") | |
buff = "" | |
for i in range(30, 38): | |
buff += "\t\033[{}m {}".format(i, i) | |
print(buff) |