Skip to content

Instantly share code, notes, and snippets.

@ceponce60
ceponce60 / Bar.scala
Created August 29, 2018 23:10 — forked from RichyHBM/Bar.scala
Avian executable with Scala example
//In subdirectory src/Foo
package Foo
object Bar {
val str = "Hello, world!"
}
@ceponce60
ceponce60 / 0_with_subprocess_and_password_as_function.py
Created June 16, 2018 17:44 — forked from rochacbruno/0_with_subprocess_and_password_as_function.py
Executar comando do OS (unix) como root usando sudo no Python - run a command as root using sudo from Python
import subprocess
echo = subprocess.Popen(['echo','123'],
stdout=subprocess.PIPE,
)
sudo = subprocess.Popen(['sudo','-S','iptables','-L'],
stdin=echo.stdout,
stdout=subprocess.PIPE,
)