Skip to content

Instantly share code, notes, and snippets.

Avatar

Marllus Lustosa marlluslustosa

View GitHub Profile
@marlluslustosa
marlluslustosa / .bash_profile
Created Jul 11, 2020 — forked from jonsuh/.bash_profile
Bash echo in color
View .bash_profile
# ----------------------------------
# Colors
# ----------------------------------
NOCOLOR='\033[0m'
RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
CYAN='\033[0;36m'
@marlluslustosa
marlluslustosa / cloud_init.yaml
Created Jul 10, 2020 — forked from HighwayofLife/cloud_init.yaml
Install Docker via Cloud Init on Ubuntu VM
View cloud_init.yaml
#cloud-config
packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
# Enable ipv4 forwarding, required on CIS hardened machines
View Google Colab SSH
#CODE
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
@marlluslustosa
marlluslustosa / socat_socks_proxy.sh
Created Dec 16, 2019 — forked from lene/socat_socks_proxy.sh
Using tor as SOCKS proxy with SOCAT
View socat_socks_proxy.sh
socat TCP-LISTEN:<localport> SOCKS4A:localhost:<host>:<remoteport>,socksport=9050
# for example, to ssh into secret.shell.server.org via tor, do:
$ socat TCP-LISTEN:22222 SOCKS4A:localhost:secret.shell.server.org:22,socksport=9050 &
$ ssh localhost -p 22222
View keybase.md

Keybase proof

I hereby claim:

  • I am marlluslustosa on github.
  • I am mlustosa (https://keybase.io/mlustosa) on keybase.
  • I have a public key whose fingerprint is 2C59 28C8 4B1B E8FC D68B 8C46 BF23 47A4 E389 C83D

To claim this, I am signing this object:

@marlluslustosa
marlluslustosa / h264-fedora-27-firefox59+
Last active May 4, 2018
Enable H.264 in Firefox on Fedora 25
View h264-fedora-27-firefox59+
# Enable H.264 in Firefox 59+ on Fedora 27
- Enable RPMFusion repositories following [these instructions](https://rpmfusion.org/Configuration).
- Run these commands:
```sh
su -c 'dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'
sudo dnf install ffmpeg-libs
sudo dnf install gstreamer1-libav gstreamer1-vaapi gstreamer1-plugins-{good,good-extras,ugly} -y
sudo dnf config-manager --set-enabled fedora-cisco-openh264
sudo dnf install gstreamer1-plugin-openh264 mozilla-openh264
View nginxdefault.conf
upstream tunnel {
server 127.0.0.1:5555;
}
upstream tunnel2 {
server 127.0.0.1:5557;
}
server {
listen 443;
@marlluslustosa
marlluslustosa / SSS reverse "caseiro" (aka serveo.net))
Last active May 5, 2018 — forked from gdamjan/README.md
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all.The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.
View SSS reverse "caseiro" (aka serveo.net))
What
====
A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.
Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).
Requirements
============
You can’t perform that action at this time.