Skip to content

Instantly share code, notes, and snippets.

View marlluslustosa's full-sized avatar

Marllus Lustosa marlluslustosa

View GitHub Profile
@marlluslustosa
marlluslustosa / .bash_profile
Created July 11, 2020 13:33 — forked from jonsuh/.bash_profile
Bash echo in color
# ----------------------------------
# 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 July 10, 2020 15:20 — forked from HighwayofLife/cloud_init.yaml
Install Docker via Cloud Init on Ubuntu VM
#cloud-config
packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
# Enable ipv4 forwarding, required on CIS hardened machines
@marlluslustosa
marlluslustosa / Google Colab SSH
Created May 1, 2020 15:07 — forked from yashkumaratri/Google Colab SSH
SSH into google colab
#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 December 16, 2019 12:55 — forked from lene/socat_socks_proxy.sh
Using tor as SOCKS proxy with SOCAT
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
@marlluslustosa
marlluslustosa / h264-fedora-27-firefox59+
Last active May 4, 2018 02:36
Enable H.264 in Firefox on Fedora 25
# 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
@marlluslustosa
marlluslustosa / SSS reverse "caseiro" (aka serveo.net))
Last active May 5, 2018 16:07 — 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.
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
============