Skip to content

Instantly share code, notes, and snippets.

View SwagDevOps's full-sized avatar

Dimitri Arrigoni SwagDevOps

  • Colmar, France
  • 09:28 (UTC +02:00)
View GitHub Profile
@eliav-lavi
eliav-lavi / prepend_wrapper.rb
Created October 16, 2018 07:26
Wrapping methods with prepend
module FooWrapper
def bar
puts "this will happen before the real bar!"
super
end
end
class Foo
prepend FooWrapper
@zoilomora
zoilomora / README.md
Last active July 18, 2026 19:23
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@tarnagas
tarnagas / ush.sh
Created July 9, 2019 08:59
Unsecure (S)SH
#!/usr/bin/env sh
ssh -o UserKnownHostsFile=/dev/null \
-o StrictHostKeyChecking=no \
-o LogLevel=ERROR \
$@
@markusfisch
markusfisch / README.md
Last active January 14, 2026 18:50
Render some Markdown file to HTML and show it in your browser

Preview Markdown files locally

Render some Markdown file to HTML and show it in your browser.

This is useful when you want to check a Markdown file before pushing it onto GitHub/GitLab/etc or if you want to simply print a nice looking Markdown file. Just print it from your browser.

The look is broadly similar to that on GitHub but stripped down to the bare minimum. It can also be changed easily. Just have a look at the

@noraj
noraj / 01-mini-netstat.rb
Last active March 2, 2023 22:29
netstat -ta4 or ss -ta4 equivalent in Ruby and Crystal
require 'etc'
TCP_STATES = { # /usr/src/linux/include/net/tcp_states.h
'00': 'UNKNOWN',
'FF': 'UNKNOWN',
'01': 'ESTABLISHED',
'02': 'SYN_SENT',
'03': 'SYN_RECV',
'04': 'FIN_WAIT1',
'05': 'FIN_WAIT2',