Skip to content

Instantly share code, notes, and snippets.

View jeffotoni's full-sized avatar

Jefferson Otoni Lima jeffotoni

View GitHub Profile
/** @autor jeffotoni*/
package main
import (
"fmt"
"log"
"net/http"
"github.com/gorilla/mux"
#
# example Dockerfile for https://docs.docker.com/examples/postgresql_service/
#
FROM ubuntu:16.04
# Add the PostgreSQL PGP key to verify their Debian packages.
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
#!/bin/bash
clear
tput setaf 7 ; tput setab 1 ; tput bold ; printf '%35s%s%-20s\n' "VPS Management 4.2 © @Nilbertocs" ; tput sgr0
tput setaf 6 ; tput bold ; echo "" ; echo "Este script irá:" ; echo ""
echo "● Instalar e configurar o proxy squid nas portas 80, 3128, 8080 e 8799"
echo "● Configurar o OpenSSH para rodar nas portas 22 e 443"
echo "● Instalar e Configurar o OpenVPN"
echo "● Instalar um conjunto de scripts como comandos do sistema para o gerenciamento" ; tput sgr0
echo ""
tput setaf 3 ; tput bold ; read -n 1 -s -p "Aperte qualquer tecla para continuar..." ; echo "" ; echo "" ; tput sgr0
package main
import (
"fmt"
"reflect"
"strconv"
)
type MyStruct struct {
Name string
<?php
function postFile($URL_API, $pathFile, $acesskey)
{
$path_file = $pathFile;
$pathV = explode("/", $path_file);
$nameFile = end($pathV);
$file_url = "$path_file"; //here is the file route, in this case is on same directory but you can set URL too like "http://examplewebsite.com/test.txt"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
int op;
float raio, altura, base, area = 0;
char msg[100];
<?php
/**
..######......#######.....##......##....########
.##....##....##.....##....##..##..##....##......
.##.................##....##..##..##....##......
..######......#######.....##..##..##....######..
.......##...........##....##..##..##....##......
.##....##....##.....##....##..##..##....##......
..######......#######......###..###.....##......
@autor: jeffotoni
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func main() {
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
if token, err := request.ParseFromRequest(r, request.OAuth2Extractor, keyLookupFunc2); err == nil {
claims := token.Claims.(jwt.MapClaims)
fmt.Printf("Token for user %v expires %v", claims["user"], claims["exp"])
} else if err != nil {
fmt.Println("Error: ", err)