User contributions for 413vhcu1lq0463ob
A user with 305 edits. Account created on 6 October 2024.
6 February 2025
- 11:1911:19, 6 February 2025 diff hist +2 Convert date to timestamp and timestamp to date in Python No edit summary current
- 11:1711:17, 6 February 2025 diff hist +397 N Convert date to timestamp and timestamp to date in Python Created page with "Date to timestamp from datetime import datetime # Date date = datetime(2025, 2, 6) # Example date (Year, Month, Day) # Convert to timestamp timestamp = date.timestamp() print(timestamp) Timestamp to date from datetime import datetime # Timestamp timestamp = 1615931732 # Example timestamp # Convert to date date = datetime.utcfromtimestamp(timestamp).date() print(date)" Tag: Visual edit
- 11:1611:16, 6 February 2025 diff hist +64 Python No edit summary current Tag: Visual edit
4 February 2025
- 14:4114:41, 4 February 2025 diff hist +382 N Use wireshark remotelly on another host and the UI locally Created page with "to use wireshark remotelly and the UI locally first you need to have wireshark installed and then create a command (bin/rwireshark) with this content: <nowiki>#</nowiki>!/bin/bash HOST=$1 shift TCPDUMP_ARGS=$@ wireshark -i <(ssh "$HOST" sudo tcpdump -s 0 -U -n -w - $TCPDUMP_ARGS) to use basically you can do the following: rwireshark [hostname/ip] [other tcpdump parameters]" current Tag: Visual edit
- 14:3814:38, 4 February 2025 diff hist +65 Networking No edit summary current Tag: Visual edit
- 13:3213:32, 4 February 2025 diff hist 0 PostgreSQL No edit summary current Tag: Visual edit
- 13:3213:32, 4 February 2025 diff hist 0 PostgreSQL No edit summary Tag: Visual edit: Switched
- 13:2713:27, 4 February 2025 diff hist −2 Allow remote connections on PostgreSQL →Edit pg_hba.conf current Tag: Visual edit
- 13:2613:26, 4 February 2025 diff hist +2,767 N Allow remote connections on PostgreSQL Created page with " To configure PostgreSQL to accept connections from hosts other than <code>localhost</code>, you'll need to modify two files: # '''<code>postgresql.conf</code>''': This file controls various settings related to the PostgreSQL server. # '''<code>pg_hba.conf</code>''': This file controls client authentication and permissions (if not configured properly the PostgreSQL instance will accept unauthenticated connections). Here’s how you can configure both: === Edit <code>p..." Tag: Visual edit
- 13:2113:21, 4 February 2025 diff hist +45 PostgreSQL No edit summary Tag: Visual edit
- 12:4512:45, 4 February 2025 diff hist +1,599 N Create a user on PostgreSQL Created page with "To create an user on a PostgreSQL database you can use: CREATE USER new_user WITH PASSWORD 'password'; To guarantee full access on a database you can: GRANT ALL PRIVILEGES ON DATABASE database_name TO new_user; Also to allow the user to connect on the database you need to: GRANT CONNECT ON DATABASE database_name TO new_user; If you want the user to have full access to all tables, sequences, and other objects in the database, you can use: \c database_name -- To con..." current Tag: Visual edit
- 12:4112:41, 4 February 2025 diff hist +4 PostgreSQL No edit summary Tag: Visual edit
- 12:4112:41, 4 February 2025 diff hist +30 PostgreSQL No edit summary Tag: Visual edit
3 February 2025
- 13:4313:43, 3 February 2025 diff hist +328 N Chef configuration manager : cookbook promotion Created page with "promote cookbook knife spork promote ENVIRONMENT --remote REMOTE push changes git push origin main search for the nodes knife search node 'role:ROLE' -i run chef client on all nodes if you do not want to wait knife ssh 'role:NODE' 'sudo chef-client' -C how many commands at time knife ssh 'role:ROLE' -C1 'sudo chef-client'" current Tag: Visual edit
- 13:1813:18, 3 February 2025 diff hist +54 Chef configuration management No edit summary current Tag: Visual edit
- 13:1313:13, 3 February 2025 diff hist +2,015 N Chef configuration manager : role creation Created page with "=== '''Navigate to the Roles Directory''' === Roles are stored in a roles/ directory, usually within your Chef repository. If the directory doesn't exist, you can create it. === '''Create the Role File''' === Now, create a new role file. You can name the role file anything, but it’s common to use a name that describes the purpose of the role. For example, let's create a role called rolename. touch roles/rolename.json === '''Edit the Role File''' === Open the rolenam..." current Tag: Visual edit
- 13:0713:07, 3 February 2025 diff hist +48 N Chef configuration management Created page with "* Chef configuration manager : role creation" Tag: Visual edit
- 13:0613:06, 3 February 2025 diff hist +36 Main Page No edit summary Tag: Visual edit
- 10:3110:31, 3 February 2025 diff hist +94 N List tables on PostgreSQL schema Created page with "=== Query === SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';" current Tag: Visual edit
- 10:3010:30, 3 February 2025 diff hist +39 PostgreSQL No edit summary Tag: Visual edit
- 10:2810:28, 3 February 2025 diff hist +609 N "Describe" a table in PostgreSQL Created page with "=== Query === SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = 'TABLE NAME HERE'; === Example === SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = 'pg_database'; oid|oid|NO datname|name|NO datdba|oid|NO encoding|integer|NO datlocprovider|"char"|NO datistemplate|boolean|NO datallowconn|boolean|NO datconnlimit|integer|NO datfrozenxid|xid|NO datminmxid|xid|NO dattablespac..." current Tag: Visual edit: Switched
- 10:2710:27, 3 February 2025 diff hist +39 PostgreSQL No edit summary Tag: Visual edit
- 10:2510:25, 3 February 2025 diff hist +577 N List databases on PostgreSQL instance Created page with "=== Query === SELECT datname FROM pg_database; === "Describe" === SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_name = 'pg_database'; === column_name, data_type, is_nullable === oid|oid|NO datname|name|NO datdba|oid|NO encoding|integer|NO datlocprovider|"char"|NO datistemplate|boolean|NO datallowconn|boolean|NO datconnlimit|integer|NO datfrozenxid|xid|NO datminmxid|xid|NO dattablespace|oid|NO datcollate|text|NO da..." current Tag: Visual edit
- 10:1810:18, 3 February 2025 diff hist +43 N PostgreSQL Created page with "* List databases on PostgreSQL instance" Tag: Visual edit
- 10:1710:17, 3 February 2025 diff hist +17 Databases No edit summary current Tag: Visual edit
- 10:1710:17, 3 February 2025 diff hist +3,226 N MySQL/MariaDB Created page with "== Stuffs == === Creating and deleting databases on MariaDB === CREATE DATABASE database_name; === Creating and deleting users on MariaDB === CREATE USER 'username'@'%' IDENTIFIED BY 'password'; DROP USER 'username'@'%'; === Granting privileges on databases to users on MariaDB === GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'%'; === FLUSH PRIVILEGES === At the end, always flush privileges. FLUSH PRIVILEGES; === How to make backups of MariaDB === Almo..." current Tag: Visual edit: Switched
- 10:1710:17, 3 February 2025 diff hist −3,207 Databases Replaced content with "* MySQL/MariaDB" Tags: Replaced Visual edit
29 January 2025
- 07:4907:49, 29 January 2025 diff hist +96 N Linux Save Terminal Output to a File While Working Created page with "You can use the command script To save all your terminal output to a file until you type exit." current Tag: Visual edit
- 07:4607:46, 29 January 2025 diff hist −35 Linux No edit summary Tag: Visual edit
- 07:4607:46, 29 January 2025 diff hist +94 Linux No edit summary Tag: Visual edit
- 07:3907:39, 29 January 2025 diff hist +47 Linux Checkup Script No edit summary current
- 07:3807:38, 29 January 2025 diff hist +426 N Linux Checkup Script Created page with "echo 'hostname' hostname echo '' echo 'date' date echo '' echo 'df -h' df -h echo '' echo 'df -i' df -i echo '' echo 'uptime' uptime echo '' echo 'apt list --installed' apt list --installed echo '' echo 'ps auxfww' ps auxfww echo '' echo 'iptables-save' iptables-save echo '' echo 'ip a' ip a echo '' echo 'ss -tuln' ss -tuln echo '' echo 'cat /proc/loadavg' cat /proc/loadavg echo '' echo 'free -h' free -h echo ''" Tag: Visual edit: Switched
- 07:2807:28, 29 January 2025 diff hist +27 Linux No edit summary Tag: Visual edit
24 January 2025
- 13:1213:12, 24 January 2025 diff hist +1,053 N Internal Ranges For Use Internally Created page with "For internal networks, the private IP address ranges specified by <nowiki>RFC 1918</nowiki> are typically used. These ranges are reserved for private use, meaning they are not routed on the public internet. The three main private IP address ranges you can use for internal networks are: # '''Class A''': #* Range: <code>10.0.0.0</code> to <code>10.255.255.255</code> #* Subnet mask: <code>255.0.0.0</code> (or <code>/8</code>) # '''Class B''': #* Range: <code>172.16.0.0</co..." current Tag: Visual edit
- 13:1213:12, 24 January 2025 diff hist +40 N Networking Created page with "* Internal Ranges For Use Internally" Tag: Visual edit
- 13:1113:11, 24 January 2025 diff hist +17 Main Page →Stuffs Tag: Visual edit
8 January 2025
- 19:2219:22, 8 January 2025 diff hist +42 Linux No edit summary Tag: Visual edit
7 January 2025
- 09:4009:40, 7 January 2025 diff hist +161 N Redirect stdout and stderr Created page with "To redirect a stderr and stdout to a file you can send the stderr to the stdin and write the stdin into a file.<blockquote>command > outputfile 2>&1</blockquote>" current Tag: Visual edit
- 09:4009:40, 7 January 2025 diff hist +33 Linux No edit summary Tag: Visual edit
2 January 2025
- 08:5808:58, 2 January 2025 diff hist +10 Linux No edit summary Tag: Visual edit
1 January 2025
- 20:4420:44, 1 January 2025 diff hist +1 Python TTS (Text To Speech) with AWS Polly No edit summary current Tag: Visual edit: Switched
- 20:4320:43, 1 January 2025 diff hist +987 N Python TTS (Text To Speech) with AWS Polly Created page with " # importing libs import boto3 import logging # Initialize the Polly client polly_client = boto3.client('polly') def awsPollyTTS(input_text, output_file_name="output.mp3", voice_id='Joanna', output_format='mp3'): try: # Request speech synthesis from AWS Polly response = polly_client.synthesize_speech( Text=text, VoiceId=voice_id, OutputFormat=output_format, SampleRate='22050' )..." Tag: Visual edit: Switched
- 20:4220:42, 1 January 2025 diff hist +49 Python No edit summary Tag: Visual edit
24 December 2024
- 11:3511:35, 24 December 2024 diff hist +29 N Crypto Created page with "* CoinMarketCap API usage" current Tag: Visual edit
- 11:3511:35, 24 December 2024 diff hist +13 Main Page No edit summary Tag: Visual edit
11 December 2024
- 09:4009:40, 11 December 2024 diff hist +377 N Docker file example Created page with " # Use a python image FROM python:3.9-slim # Define the workdir inside the container WORKDIR /app # Copy the files from local workdir to conainter workdir COPY . . # Install dependencies requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Expose Flask application port EXPOSE 5000 # Command to run the application CMD ["python", "app.py"]" current Tag: Visual edit
- 09:3709:37, 11 December 2024 diff hist +26 Docker No edit summary current Tag: Visual edit
22 November 2024
- 22:5922:59, 22 November 2024 diff hist −8 Pedro's Fedora Linux setup No edit summary current
18 November 2024
- 13:2713:27, 18 November 2024 diff hist +419 Pedro's Fedora Linux setup No edit summary Tag: Visual edit
16 November 2024
- 00:3600:36, 16 November 2024 diff hist +80 ProxMox Advanced Course No edit summary current Tag: Visual edit