Refactoring - Ruby Edition
Extract Method
Inline Method
Inline Temp
| # Everaldo Gomes 09/02/2026 | |
| # Esta imagem é baseada em Alpine Linux, mas não vem com rsync instalado | |
| # Construa a imagem com este comando: docker build -t openssh-rsync . | |
| # openssh-rsync - o nome da imagem, é apenas um thin wrapper sobre openssh-server, instalando rsync lá dentro | |
| FROM linuxserver/openssh-server:latest | |
| RUN apk add --no-cache rsync |
| #!/bin/bash | |
| # ============================================================================== | |
| # SERVER HARDENING & DOCKER SETUP (PARA USUÁRIO EXISTENTE) | |
| # ============================================================================== | |
| set -euo pipefail | |
| # --- AJUSTE AQUI --- | |
| DEPLOY_USER="o_seu_usuario_aqui" # Substitua pelo nome do seu usuário de deploy |
| git init . # cria um repositório | |
| git remote origin https://github.com/usuario/projeto.git | |
| # adiciona remote | |
| # crie projeto no github antes | |
| git add . # adiciona todos os arquivos | |
| git commit -m 'mensagem' # faz o commit | |
| git checkout -b gh-pages # cria branch gh-pages | |
| git push origin gh-pages # envia para o github |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>Contador de Visitas</title> | |
| </head> | |
| <body> | |
| <?php |
| # Add it in your alias | |
| # usage: bash-record final_gif_name speed:optional cast_file:optional | |
| # | |
| # Requires asciinema and docker. | |
| # Optional to have gifsicle for gif optimization. | |
| # | |
| # Examples: | |
| # bash-record testing-command-x | |
| # bash-record slow-recording-x 2 | |
| # bash-record please-faster-x 20 /tmp/slow-recording-x.cast |
| docker run --name myadmin -d -e PMA_HOST=mydatabase.com -e PMA_USER=admin -e PMA_PASSWORD=password -p 8080:80 phpmyadmin/phpmyadmin |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |