Skip to content

Instantly share code, notes, and snippets.

@BAKMAH
BAKMAH / tutorial_kali_autologin_afterupdate.txt
Created April 22, 2022 21:43 — forked from intrd/tutorial_kali_autologin_afterupdate.txt
Kali light xfce4 root autologin (works after lightdm update)
## Kali light xfce4 root autologin (works after lightdm update)
# @author intrd - http://dann.com.br/
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/
After lighdtdm update root autologin is broken fix doing this:
nano /etc/lightdm/lightdm.conf
at [Seat:*] group uncomment/edit:
autologin-user=root
autologin-user-timeout=0
@BAKMAH
BAKMAH / vmware-urls.csv
Created November 21, 2021 12:33 — forked from ewypych/vmware-urls.csv
List of some popular VMware tools with theirs urls
Product Version FQDN URL
VMwareESXi 6.0 ESXi /ui
VMwareESXi 6.5 ESXi /ui
VMwareESXi 6.0 ESXi /sdk
VMwareESXi 6.5 ESXi /sdk/vimService.wsdl
vSphereWebClient 5.1 vCenter :9443/vsphere-client
vSphereWebClient 5.5 vCenter :9443/vsphere-client
vSphereWebClient 6.0 vCenter /vsphere-client
vSphereWebClient 6.0 vCenter :9443
vSphereWebClient 6.5 vCenter /vsphere-client
@BAKMAH
BAKMAH / Astra_Docker.md
Created August 18, 2021 05:23 — forked from daznext/Astra_Docker.md
Install Docker on AstraLinux Orel

Обновляемся

apt update && apt upgrade

Ставим docker

sudo apt-get install apt-transport-https ca-certificates curl gnupg2 
@BAKMAH
BAKMAH / Exception.rb
Created July 23, 2020 11:40 — forked from stuart-warren/Exception.rb
Windows Event log via nxlog (json) -> logstash 1.2 config
Exception in filterworker {"exception"=>#<NoMethodError: undefined method `[]=' for nil:NilClass>, "backtrace"=>["file:/opt/logstash/logstash.jar!/logstash/event.rb:135:in `[]='", "org/jruby/RubyProc.java:255:in `call'", "(eval):9:in `exec'", "org/jruby/RubyProc.java:255:in `call'", "file:/opt/logstash/logstash.jar!/logstash/util/fieldreference.rb:44:in `exec'", "file:/opt/logstash/logstash.jar!/logstash/event.rb:134:in `[]='", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:234:in `rename'", "org/jruby/RubyHash.java:1332:in `each'", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:232:in `rename'", "file:/opt/logstash/logstash.jar!/logstash/filters/mutate.rb:205:in `filter'", "(eval):127:in `initialize'", "org/jruby/RubyProc.java:255:in `call'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:243:in `filter'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:191:in `filterworker'", "file:/opt/logstash/logstash.jar!/logstash/pipeline.rb:134:in `start_filters'"], :level=>:
$username = "[email protected]"
$pwdTxt = Get-Content "C:\temp\ExportedPassword.txt"
$securePwd = $pwdTxt | ConvertTo-SecureString
$credObject = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $securePwd
$secureStringText = $secureStringPwd | ConvertFrom-SecureString
Set-Content "C:\temp\ExportedPassword.txt" $secureStringText
@BAKMAH
BAKMAH / EmbeddedPassword.ps1
Created February 27, 2020 08:16 — forked from davefunkel/EmbeddedPassword.ps1
Embedded Credentials in a PowerShell Script
$username = "[email protected]"
$password = "Password123!@#"
$secureStringPwd = $password | ConvertTo-SecureString -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential -ArgumentList $user, $secureStringPwd
@BAKMAH
BAKMAH / postgres-cheatsheet.md
Created February 21, 2019 04:01 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
param (
[Parameter(Mandatory=$true,
Position = 0)]
[int]
$Width,
[Parameter(Mandatory=$true,
Position = 1)]
[int]
@BAKMAH
BAKMAH / Sublime Text 3 Environment Variables
Created August 18, 2016 19:16 — forked from danpe/Sublime Text 3 Environment Variables
Sublime Text 3 Environment Variables
List of all Sublime Text 3 Environment Variables to be used by Snippet Makers / Plugin Developers
$SELECTION The text that was selected when the snippet was triggered.
$TM_CURRENT_LINE Content of the line the cursor was in when the snippet was triggered.
$TM_CURRENT_WORD Current word under the cursor when the snippet was triggered.
$TM_FILENAME File name of the file being edited including extension.
$TM_FILEPATH File path to the file being edited.
$TM_FULLNAME User’s user name.
$TM_LINE_INDEX Column the snippet is being inserted at, 0 based.
$TM_LINE_NUMBER Row the snippet is being inserted at, 1 based.