Skip to content

Instantly share code, notes, and snippets.

View herlon214's full-sized avatar
🚀

Herlon Aguiar herlon214

🚀
View GitHub Profile
version: "3"
services:
# Traefik setup
traefik:
image: traefik:latest
command: -c --docker=true
--docker.swarmmode=true
--docker.domain=traefik
--docker.watch=true
--web=true
@ribasco
ribasco / how-to-install-java-on-raspbian.md
Last active March 27, 2021 18:37
How to install the latest java version in Raspbian (Stretch)

Introduction

The default version of java provided in the latest raspbian images are outdated, so we are going to install from the ppa:webupd8team/java repository instead. Please note that add-apt-repository ppa:webupd8team/java will not work, so we will need to add the repository manually.

Installation

  1. Create the gpg key file and paste the following lines of text below
nano key.txt
@dimitardanailov
dimitardanailov / sample-nginx.conf
Last active June 3, 2021 17:30
Configuration for single page application(Framework: Angularjs, Web server: Nginx)
server {
listen 80 default deferred;
server_name myapp.com;
root /var/www/project-folder/;
# Nginx and Angularjs with html mode 5 - https://gist.github.com/cjus/b46a243ba610661a7efb
index index.html;
@Christilut
Christilut / VCurrencyField.vue
Created June 7, 2018 18:14
Vuetify Currency Field
<template lang="pug">
v-text-field(
ref='field',
:prefix='prefix',
v-model='model',
@focus='onFocus',
@keyup='onKeyUp',
:error-messages='errorMessages',
v-bind='$attrs',
@change='onChange'
@eteeselink
eteeselink / delay.js
Created November 13, 2015 13:55
ES7 async/await version of setTimeout
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
async function something() {
console.log("this might take some time....");
await delay(5000);
console.log("done!")
}
something();
@RobinUS2
RobinUS2 / output-transparent-pixel.go
Created November 25, 2013 11:23
Output a 1x1 transparent gif pixel in Go webserver response. Please note, this is only the relevant code, does not work "out-of-the-box".
import (
"fmt"
"net/http"
"time"
)
const transPixel = "\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B"
func pixelHandler(w http.ResponseWriter, r *http.Request) {
// Pixel
@nknapp
nknapp / Dockerfile
Created October 30, 2016 20:15
Traefik setup as reverse-proxy with docker and letsencrypt
FROM traefik:camembert
ADD traefik.toml .
EXPOSE 80
EXPOSE 8080
EXPOSE 443
@houtianze
houtianze / java2smali.bat
Last active September 7, 2022 22:13
Windows batch file to convert .java file to .smali
:: http://stackoverflow.com/a/29052019/404271
echo JDK 7 is required
if not x%1==x goto doit
:usage
echo %~n0 ^<Java file without .java extension^>
goto end
:doit
@ba11b0y
ba11b0y / installing-postman.md
Last active August 31, 2023 19:21
Installing Postman on Ubuntu/Gnome

Since Chrome apps are now being deprecated. Download postman from https://dl.pstmn.io/download/latest/linux

Although I highly recommend using a snap

sudo snap install postman

Installing Postman

tar -xzf Postman-linux-x64-5.3.2.tar.gz
@nghuuphuoc
nghuuphuoc / 1) Install
Last active September 4, 2023 09:29
Install Redis on Centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm