Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Focusing

Anderson andersondsl

🚀
Focusing
View GitHub Profile
View Docker + Traefik + Let's Encrypt + Github Repository
Docker + Traefik + Let's Encrypt + Github Repository
Using:
- Ubuntu 19.04
- Docker Engine 19.03
- Docker Compose 1.25.0-rc2
- Traefik v1.7.18 with dnsChallenge
- Traefik v2.0.1 with httpChallenge
--
- Github Registry
View nginx
log_format compression '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
server {
listen 80;
listen 443 default_server ssl;
server_name site.espacolaser.com.br;
View conectar.bat
@echo off
echo.
echo.
ECHO Checking for an Internet connection, please wait...
PING -n 1 www.google.com|find "Reply from " >NUL
IF NOT ERRORLEVEL 1 goto :SUCCESS
IF ERRORLEVEL 1 goto :TRYAGAIN
:TRYAGAIN
echo.
@andersondsl
andersondsl / rw_ro_access.sql
Created Feb 6, 2020 — forked from checco/rw_ro_access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
View rw_ro_access.sql
--
-- Read only
--
-- Create a group
CREATE ROLE postgres_ro_group;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO postgres_ro_group;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group;
View gist:4113f981425a4a23e2093c1ec8e22511
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
http-server ./dist -S -C cert.pem -o
@andersondsl
andersondsl / Transparent VsCode on MacOs with Custom CSS and JS Loader
Created Jun 21, 2019
Transparent VsCode on MacOs with Custom CSS and JS Loader
View Transparent VsCode on MacOs with Custom CSS and JS Loader
1. Install extension "Custom CSS and JS Loader"
2. Create CSS and JS files
custom.css
custom.js
3. Add settings.json
4. Activate command "Reload Custom CSS and JS".
View php_log_helpler
function debug_to_console( $data ) {
$output = $data;
if ( is_array( $output ) )
$output = implode( ',', $output);
echo "<script>console.log( 'Debug Objects: " . $output . "' );</script>";
}
@andersondsl
andersondsl / Dockerfile
Created Aug 19, 2018
dockerfile mongodb alpine
View Dockerfile
FROM alpine:latest
RUN apk add --no-cache mongodb
VOLUME /data/db
EXPOSE 27017:27017
COPY run.sh /root
ENTRYPOINT [ "/root/run.sh" ]
CMD [ "mongod", "--bind_ip", "0.0.0.0" ]
@andersondsl
andersondsl / docker-compose.yml
Created Aug 19, 2018
docker compose for selenium drivers
View docker-compose.yml
# To execute this docker-compose yml file use `docker-compose -f <file_name> up`
# Add the `-d` flag at the end for detached execution
version: "3"
services:
selenium-hub:
image: selenium/hub:3.14.0-arsenic
container_name: selenium-hub
ports:
- "4444:4444"
chrome:
@andersondsl
andersondsl / omzsh-gameshark.md
Last active Jul 24, 2020
oh-my-zsh cheats and tricks for productivity
View omzsh-gameshark.md

oh-my-zsh gameshark

directory navigation / : cd / ~ : cd ~ ... : cd ../..

alias List all aliases. You can pipe the output to grep to search for a particular alias.

d remembers the 20 last directories you have visited.

You can’t perform that action at this time.