Skip to content

Instantly share code, notes, and snippets.

View thiagomgo's full-sized avatar
💜

Thiago Gomes thiagomgo

💜
  • Brazil
View GitHub Profile
@thiagomgo
thiagomgo / check-env.php
Created December 11, 2016 14:57
PHP environment informations.
<?php
header('Content-Type: text/plain');
print_r($_SERVER);
?>
@thiagomgo
thiagomgo / check-session.php
Last active November 30, 2016 02:54
Script to check the PHP Session Support
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
$DATE = date('m/d/Y h:i:s a', time());
// Start Session
session_start();
// Show banner
echo '<b>Session Support Checker</b><hr />';
// Check if the page has been reloaded
@thiagomgo
thiagomgo / fix-pendrive.sh
Created November 14, 2016 12:45
Script to re-write the device blocks to the appropriate size.
#/bin/bash
# Issue: Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
#
DEVICE_USB=/dev/sdb
sudo dd if=/dev/zero of=$DEVICE_USB bs=2048 count=32
@thiagomgo
thiagomgo / lambda-curl.py
Created November 1, 2016 19:13
A simple lambda function written in python to execute a curl command
def lambda_handler(event, context):
import subprocess
result = subprocess.call("curl -I http://foo.bar", shell=True)
return result
@thiagomgo
thiagomgo / Install-Redis-Desktop-Manager.sh
Created October 11, 2016 14:49
Install Redis Desktop Manager from source on Ubuntu
# Clone the repository from GitHub
git clone --recursive https://github.com/uglide/RedisDesktopManager.git -b 0.8.0 rdm && cd ./rdm
# Compile the source
cd src/
./configure
source /opt/qt56/bin/qt56-env.sh && qmake && make
sudo checkinstall -D --install
sudo gdebi /home/$USER/rdm/src/src_*.deb
cd /usr/share/redis-desktop-manager/bin
@thiagomgo
thiagomgo / Install-Docker-on-Linux-Mint.sh
Last active September 29, 2016 14:42 — forked from sirkkalap/Install-Docker-on-Linux-Mint.sh
Install Docker on Linux Mint
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x
##########################################
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
sudo apt-get update
sudo apt-get install -y apt-transport-https
fi
@thiagomgo
thiagomgo / EnableAudioCCE
Created September 15, 2016 18:02
Enable speakers on Linux Mint to CCE Notebooks.
amixer -c 0 sset Headphone 100% unmute
@thiagomgo
thiagomgo / Strem.io.desktop
Last active August 30, 2016 20:07 — forked from claudiosanches/install.sh
Install Strem.io on Linux Mint
[Desktop Entry]
Comment=Strem.io
Terminal=false
Name=Strem.io
Exec=/opt/stremio/Stremio.sh %F
Type=Application
Icon=/opt/stremio/stremio-white-small.png
@thiagomgo
thiagomgo / proftpd.conf
Last active October 30, 2017 20:37
Configuration for Proftpd on an EC2 Instance (CentOS 6)
# This is the ProFTPD configuration file
# $Id: proftpd.conf,v 1.1 2004/02/26 17:54:30 thias Exp $
ServerName "ProFTPD server"
ServerIdent off
ServerAdmin root@localhost
ServerType standalone
DefaultServer on
AccessGrantMsg "User %u logged in."
DeferWelcome off
@thiagomgo
thiagomgo / proftpd.conf
Last active October 30, 2017 20:36
Configuration for Proftpd on an EC2 Instance (CentOS 7)
# This is the ProFTPD configuration file
#
# See: http://www.proftpd.org/docs/directives/linked/by-name.html
ServerName "ProFTPD server"
ServerIdent off
ServerAdmin root@localhost
ServerType standalone
DefaultServer on