User contributions for Patrick

From Cheatsheet
Jump to navigationJump to search
Search for contributionsExpandCollapse
⧼contribs-top⧽
⧼contribs-date⧽
(newest | oldest) View ( | older 50) (20 | 50 | 100 | 250 | 500)

31 July 2023

29 July 2023

28 July 2023

  • 22:2422:24, 28 July 2023 diff hist 0 Main PageNo edit summary
  • 22:1322:13, 28 July 2023 diff hist −6 Cisco:NX-OSNo edit summary
  • 22:1222:12, 28 July 2023 diff hist −11 Cisco:NX-OSNo edit summary
  • 22:0022:00, 28 July 2023 diff hist +25 N NX-OSPatrick moved page NX-OS to Cisco:NX-OS current Tag: New redirect
  • 22:0022:00, 28 July 2023 diff hist 0 m Cisco:NX-OSPatrick moved page NX-OS to Cisco:NX-OS
  • 21:5921:59, 28 July 2023 diff hist +4,639 N Linux:ToolsCreated page with "Category:Cheatsheet == Common commands == <syntaxhighlight lang="bash"> # Scroll through a file with less less -s myfile.txt # Select line 5 from the output cat example.txt | sel -e '5' # Select lines from the output, starting from the top cat example.txt | head -5 # Select lines from the output, starting from the bottom cat example.txt | tail -5 </syntaxhighlight> == Uncommon commands == <syntaxhighlight lang="bash"> # Crash the current server echo c > /proc/sy..."
  • 21:5921:59, 28 July 2023 diff hist +1,935 N Nvidia-Onyx-IvoCreated page with "Category:Cheatsheet This page was written and contributed by Ivo Palli. == General == NVIDIA Onyx Management Console === SSH === <syntaxhighlight lang='bash'> ssh user@10.0.99.12 show what-just-happened quit </syntaxhighlight> === REST API === <syntaxhighlight lang='bash'> cat << EOF | curl -kSsLX POST -d @- -c cookies.txt "https://10.0.99.12/admin/launch?script=rh&template=json-request&action=json-login" > result.json { "username": "user", "password": "top_sec..."
  • 21:5921:59, 28 July 2023 diff hist +1,596 N WindowsCreated page with "Category:Cheatsheet == Checks == * https://azega.org/list-open-ports-using-powershell/ <syntaxhighlight lang='bash'> # List open ports and related IP-addresses Get-NetTCPConnection # "To show only the listening ports we need to filter for all items in the Listen state with the remote address of 0.0.0.0" get-nettcpconnection | where {($_.State -eq "Listen") -and ($_.RemoteAddress -eq "0.0.0.0")} # "You can add additional fields like the process ID for each port. C..."
  • 21:5821:58, 28 July 2023 diff hist +4,449 N RsyslogCreated page with "Category:Cheatsheet == Common == Default configuration: /etc/rsyslog.conf </br> Additional conf files: /etc/rsyslog.d/ </br> By default the .conf file dumps to: /var/log/ See 'man logger' for additional information. === Facility keywords === * https://en.wikipedia.org/wiki/Syslog <pre> 0 kern 1 user 2 mail 3 daemon 4 auth 5 syslog 6 lpr 7 news 8 uucp 9 cron 10 authpriv 11 ftp 12 ntp 13 security 14 console 15 solaris-cron 16-23 local0 - local7 </p..."
  • 21:5821:58, 28 July 2023 diff hist +7,570 N LinuxCreated page with "Category:Cheatsheet * https://devhints.io/ == Checks == === Systemd === <syntaxhighlight lang="bash"> # Open journalctl starting from the beginning journalctl -b # Open journalctl starting from the end journalctl -e # Show journalctl logs for the sshd service, starting from the end journalctl -u sshd -e </syntaxhighlight> === OS & Distribution === <syntaxhighlight lang="bash"> # Print OS and host information hostnamectl # Show OS and distribution information ca..."
  • 21:5821:58, 28 July 2023 diff hist +20,321 N Linux:Ansible-IvoCreated page with "Category:Cheatsheet This page was written and contributed by Ivo Palli. * https://www.lisenet.com/2019/ansible-sample-exam-for-ex294/ * https://jorge.fbarr.net/tag/ex294/ TODO: v vaults v use external variable files * actions on regex (kan met lineinfile) v create crontab v create repo v create, download and use roles (!) * configure selinux * jinja2 (.j2) templates (gewoon een text file waar je variables Template:Xx in kan zetten, en dan kopieert met module tem..."
  • 21:5821:58, 28 July 2023 diff hist +11,497 N Linux:BashCreated page with "Category:Cheatsheet == Lecture 1 == === General === * https://missing.csail.mit.edu/ BASH stands for the Bourne Again SHell. <syntaxhighlight lang="bash"> [root@ubuntu ~]# echo "Hello world" Hello world [root@ubuntu ~]# echo Hello\ world Hello world </syntaxhighlight> An environment variable is used to store the location to search for programs on the system: <syntaxhighlight lang="bash"> [root@ubuntu ~]# echo $PATH /root/.local/bin:/root/bin:/usr/local/sbin:/sbin..."
  • 21:5721:57, 28 July 2023 diff hist +28,559 N Linux:Bash-IvoCreated page with "Category:Cheatsheet This page was written and contributed by Ivo Palli. == Template == <syntaxhighlight lang='bash'> #!/usr/bin/env bash set -o errexit # Exit on error, do not continue running the script set -o nounset # Trying to access a variable that has not been set generates an error set -o pipefail # When a pipe fails generate an error if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then echo 'Usage: ./script.sh arg-one arg-two This is an awesome bas..."
  • 21:5721:57, 28 July 2023 diff hist +5,839 N Linux:NetworkCreated page with "Category:Cheatsheet == Checks == === Common === <syntaxhighlight lang="bash"> # List route table route -n # Check open ports, connected IPs and more netstat -s # Check open ports, connected IPs and more netstat -taupen # Check open ports, connected IPs and more netstat -tulpn # Show all active network connections nmcli connection show # Show active and unactive network connections nmcli dev status # List iptable rules (Nftables) iptables -nvL # List iptable r..."
  • 21:5621:56, 28 July 2023 diff hist +2,133 N Linux:ScriptsCreated page with "Category:Cheatsheet == Common == <syntaxhighlight lang='bash'> # Execute a command within all objects in a folder. for i in *; do du -h "$i" ; done </syntaxhighlight> <syntaxhighlight lang='bash'> # man test [] Brackets are for checking whether something is true or not. if [ -d "$D" ] then else </syntaxhighlight> == SSH == === centos-create-user.sh === <syntaxhighlight lang="bash"> #!/bin/bash # Execute as root # Usage: ./centos-create-user.sh USER USER="$1" e..."
  • 21:5621:56, 28 July 2023 diff hist +11,067 N Linux:Scripting:JQ-IvoCreated page with "Category:Cheatsheet This page was written and contributed by Ivo Palli. Also see: * XPath for XML * pup for HTML * Miller for CSV/TSV __TOC__ == General == Program to get information from JSON files on the commandline == Usage == <syntaxhighlight lang='bash'> cat stuff.json | jq . # Prettify jq -s add,min,max,add/length file_with_numbers # Total, min, max, avg echo "[[1,2,3,4],[5,6,7,8..."
  • 21:5621:56, 28 July 2023 diff hist +2,767 N KubernetesCreated page with "Category:Cheatsheet == Links == Documentation: * Official cheatsheet: https://kubernetes.io/docs/reference/kubectl/cheatsheet/ * https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#create-a-simple-pod-to-use-as-a-test-environment == Checks == <syntaxhighlight lang="bash"> # Show the Kubernetes and kubectl version. kubectl version # Get all deployed pods kubectl get deployments --all-namespaces # Get all pods in all namespaces kubectl ge..." current
  • 21:5421:54, 28 July 2023 diff hist +11,092 N SQLite-IvoCreated page with "Cheatsheets This page was written and contributed by Ivo Palli. == General == An SQL solution that puts data into local files, without a server/client setup. The source files are merged into a single C file called the [https://www.sqlite.org/amalgamation.html amalgamation] to easy embedding SQLite into your own program. There are a number of optional components you can enable via defines: * [https://www.sqlite.org/fts3.html FTS3] and [https://..."
  • 21:5321:53, 28 July 2023 diff hist 0 MediaWiki:Spam-whitelistNo edit summary current
  • 21:5321:53, 28 July 2023 diff hist +433 N MediaWiki:Spam-whitelistCreated page with " #<!-- leave this line exactly as it is --> <pre> # External URLs matching this list will *not* be blocked even if they would # have been blocked by block list entries. # # Syntax is as follows: # * Everything from a "#" character to the end of the line is a comment # * Every non-blank line is a regex fragment which will only match hosts inside URLs #</pre> <!-- leave this line exactly as it is --> www\.tutorialspoint\.com"
  • 21:5021:50, 28 July 2023 diff hist +1,885 N FortinetCreated page with "Cheatsheets == Links == * https://docs.fortinet.com/product/fortigate/6.4 * https://docs.fortinet.com/document/fortigate/6.4.7/administration-guide/954635/getting-started * https://docs.fortinet.com/document/fortigate/6.0.0/cli-reference/830108/ping-options-ping6-options == Checks == === Common === <syntaxhighlight lang="bash"> # Ping IP 8.8.8.8 execute ping 8.8.8.8 # Ping from a specific interface IP execute ping-options source 10.0.25.1 # P..."
  • 21:4921:49, 28 July 2023 diff hist +524 N DatabasesCreated page with "Cheatsheets == MYSQL+MARIADB == <syntaxhighlight lang="bash"> # Log into the MySQL CLI mysql -u root -p # Show all tables in the database SHOW TABLES; # Exit the MySQL CLI exit </syntaxhighlight> == Postgres == <syntaxhighlight lang="bash"> # Log into the Postgres CLI psql # List all databases \l # Connect to a database -d mydatabase -U databaseuser –W # Switch to the new database connection \c mydatabase databaseuser # List all tables \..."
  • 21:4921:49, 28 July 2023 diff hist +7,897 N CumulusCreated page with "Cheatsheets * Practice: https://www.nvidia.com/en-us/networking/ethernet-switching/cumulus-vx/ * https://docs.nvidia.com/networking-ethernet-software/knowledge-base/Setup-and-Getting-Started/Cumulus-Linux-Command-Reference-Guide/ == Checks == === Common === <syntaxhighlight> # Ping from a specific (VLAN, VRF, ethernet) interface ping -I eth0 10.0.0.2 # Displays significant and relevant information for all 'up' interfaces. net show interface #..."
  • 21:4921:49, 28 July 2023 diff hist +12,792 N Cisco:NX-OSCreated page with "Cheatsheets {{#lst:Cisco|cisco-intro}} Cisco </br> * https://www.firewall.cx/cisco-technical-knowledgebase/cisco-data-center/1206-nexus-nx-os-commands-scripting-hints-and-tips.html * https://www.packetswitch.co.uk/cisco-nexus-useful-commands/ {{#lst:Cisco|cisco-basics}} Cisco#Commandline basics == Checks == === Common === <syntaxhighlight> # Show all logs show logging # Show current time show clock # Show users show user-account #..."
  • 21:4421:44, 28 July 2023 diff hist −37 Main PageNo edit summary Tag: Visual edit: Switched
  • 21:3721:37, 28 July 2023 diff hist +16,199 N CiscoCreated page with "Cheatsheets <section begin="cisco-intro"/> Some commands don't exist on older versions of Cisco software, and other commands may be deprecated in newer versions. <section end="cisco-intro"/> <section begin="cisco-basics"/> == Basics == === Connecting via Console === # Plug a '''Console cable''' into the Cisco switch and connect the cable to your laptop/whatever. Best type of cable to use is USB to Console; # Check Windows "Device Manager" - "Por..."
(newest | oldest) View ( | older 50) (20 | 50 | 100 | 250 | 500)