Skip to content

Instantly share code, notes, and snippets.

View ant-rod-silva's full-sized avatar

Prof. Rodrigo Silva ant-rod-silva

View GitHub Profile
@filipelenfers
filipelenfers / installJdkTarGzUbuntu.sh
Last active April 29, 2025 13:08
Install JDK from tar.gz Ubuntu
#Login as root
sudo su
#create jdk directory
mkdir /opt/jdk
#uncompress, change to your file name
tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk
#check if files are there
@ruyjfs
ruyjfs / Dockerfile.bash
Last active September 27, 2018 20:40
Comandos para docker
FROM ubuntu:16.04
MAINTAINER [email protected]
RUN apt-get update && apt-get install -y nginx && apt-get clean && /etc/init.d/nginx start
LABEL Description="Webserver"
VOLUME /var/www/html
EXPOSE 80
@hodgesmr
hodgesmr / hijacking_flask_routing_for_fun_and_profit.py
Last active June 18, 2024 15:22
Automatically register Flask routes with and without trailing slash. This way you avoid the 301 redirects and don't have to muddy up your blueprint with redundant rules.
"""Flask Blueprint sublcass that overrides `route`.
Automatically adds rules for endpoints with and without trailing slash.
"""
from flask import Blueprint, Flask
class BaseBlueprint(Blueprint):
"""The Flask Blueprint subclass."""
@dklisiaris
dklisiaris / install_nodejs_npm_ubuntu12-04.md
Last active December 27, 2018 11:46
Latest node.js & npm installation on Ubuntu 12.04

This is probably the quickest way to install nodejs and npm on 12.04. For compiling and install from source check this.

Use launchpad repo by Chris Lea

sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update