Skip to content

Instantly share code, notes, and snippets.

View perseoq's full-sized avatar
🐧
pingü

Rodrigo perseoq

🐧
pingü
View GitHub Profile
@perseoq
perseoq / install-apps.sh
Created December 25, 2021 20:18 — forked from aamnah/install-apps.sh
Bash script to install packages [Git, s3cmd] on a new system. For Debian and Ubuntu. To run, copy the script to the server and run ``bash install-apps.sh``
#!/bin/bash/
#######################################
# Bash script to install apps on a new system (Ubuntu)
# Written by @AamnahAkram from http://aamnah.com
#######################################
## Update packages and Upgrade system
sudo apt-get update -y
## Git ##
@perseoq
perseoq / sudoSample.py
Created July 27, 2021 01:57 — forked from aeroaks/sudoSample.py
Run Sudo command using Python
import subprocess
# run command using Popen and provide password using communicate.
# password requires byte format.
# sudo -S brings password request to PIPE
proc = subprocess.Popen(['sudo', '-S', 'nano', 'test.txt'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate(input=b'password\n')
# Print output and errors
print(proc)
@perseoq
perseoq / 0_reuse_code.js
Created March 16, 2016 06:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console