Skip to content

Instantly share code, notes, and snippets.

View netoht's full-sized avatar
🚀

Waldinar Oliveira Neto netoht

🚀
View GitHub Profile
@netoht
netoht / README.md
Created September 18, 2023 16:08 — forked from abelcallejo/README.md
Create bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@netoht
netoht / podman-install-macos.sh
Last active September 10, 2021 12:51
podman on macOS - basic configuration (like a docker)
# Pre-req
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install podman
brew install podman
# Start vm
podman machine init
podman machine start
@netoht
netoht / user-data.sh
Created August 29, 2020 04:44
AWS EC2 user-data error handling
# error handling
# redirect logs so can be found in instance -> actions -> instance settings -> Get System log
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
# trap errors. Shutdown restarts machine in an hour and prevents further commands,
# so instances won't finish booting and won't report to ECS
function my_trap()
{
echo "Sorry, there was an error at line $1 $2" && shutdown -h +60
}
trap 'my_trap $${LINENO} $$? ' ERR
@netoht
netoht / terminator-dracula-theme
Created May 7, 2020 21:55
~/.config/terminator/config
[global_config]
title_inactive_bg_color = "#4d4d4d"
title_inactive_fg_color = "#ffffff"
title_transmit_bg_color = "#1e1f29"
title_transmit_fg_color = "#02ff5f"
[keybindings]
[layouts]
[[default]]
[[[child1]]]
parent = window0
@netoht
netoht / TimeZoneTest.java
Created September 30, 2019 02:28
TimeZoneTest
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
public class TimeZoneTest {
// https://www.worldtimebuddy.com/?pl=1&lid=2643743,3448439,3530597&h=2643743
public static void main(String[] args) {
@netoht
netoht / java_debug_config
Last active May 5, 2018 00:52
Debug ssl and handshake
-Djavax.net.debug=ssl,handshake
nmap --script ssl-enum-ciphers -p 443 10.10.10.221
@netoht
netoht / send_packages.sh
Created September 19, 2017 15:37
Send packages test
# Install
- netcat
# Listen
nc -luv 12201
# Send
nc -nuv 10.0.0.1 12201
sudo trimforce enable
sudo cat /var/log/syslog | lolcat -F 0.1