Skip to content

Instantly share code, notes, and snippets.

@morvanabonin
morvanabonin / comandos-docker
Last active April 19, 2024 16:00
Comandos do Docker
Segue a lista de comandos docker e sua utilidade:
docker attach – Acessar dentro do container e trabalhar a partir dele.
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem.
docker commit – Cria uma imagem a partir de um container.
docker cp – Copia arquivos ou diretórios do container para o host.
docker create – Cria um novo container.
docker diff – Exibe as alterações feitas no filesystem do container.
docker events – Exibe os eventos do container em tempo real.
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele.
@rashid327
rashid327 / states-of-india
Last active April 19, 2024 15:59
Indian States dropdown HTML
<!-- States of India -->
<select>
<option value="AP">Andhra Pradesh</option>
<option value="AR">Arunachal Pradesh</option>
<option value="AS">Assam</option>
<option value="BR">Bihar</option>
<option value="CT">Chhattisgarh</option>
<option value="GA">Gujarat</option>
<option value="HR">Haryana</option>
@rxaviers
rxaviers / gist:7360908
Last active April 19, 2024 15:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jangeador
jangeador / rules.bat
Created October 31, 2014 17:46
Firewall Rules to Allow VEEAM to backup a Hyper-V Host
REM Rules are from here: http://www.veeam.com/kb1518
REM On Hyper-V Host Server open these ports
netsh advfirewall firewall add rule name="VEEAM Backup and Replication TCP" dir=in action=allow protocol=TCP localport=135,137-139,445
netsh advfirewall firewall add rule name="VEEAM Backup and Replication UDP" dir=in action=allow protocol=UDP localport=135,137-139,445
netsh advfirewall firewall add rule name="VEEAM Installer Service" dir=in action=allow protocol=TCP localport=6160
netsh advfirewall firewall add rule name="VEEAM Backup Proxy Service" dir=in action=allow protocol=TCP localport=6162
netsh advfirewall firewall add rule name="VEEAM vPower NFS Service" dir=in action=allow protocol=TCP localport=6161
netsh advfirewall firewall add rule name="VEEAM vPower NFS Service" dir=in action=allow protocol=TCP localport=6161
netsh advfirewall firewall add rule name="VEEAM Standard NFS Ports TCP" dir=in action=allow protocol=TCP localport=111,2049-2059,1058-1068
netsh advfirewall firewall add rule name="VEEAM Stand
@jxmorris12
jxmorris12 / torch_ddp_verify.py
Last active April 19, 2024 15:54
verify parameter weights & gradients in pytorch
def verify_ddp_weights_equal(model: torch.nn.Module, atol: float = 1e-5) -> None:
if hasattr(model, "module"):
model = model.module
world_size = get_world_size()
for name, param in model.named_parameters():
gathered_param = gather(param).reshape((world_size, -1))
absolute_diffs = (gathered_param[None, 0, :] - gathered_param).abs()
rank_params_eq = (absolute_diffs < atol).all()
assert rank_params_eq, f"❌ param [{name}] not equal - got max_absolute_diff={absolute_diffs.max()}"
@ammarshah
ammarshah / all_email_provider_domains.txt
Last active April 19, 2024 15:53
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
@mlinhard
mlinhard / docker_desc.sh
Last active April 19, 2024 15:53
Shell script to find docker image descendants
#!/bin/bash
parent_short_id=$1
parent_id=`docker inspect --format '{{.Id}}' $1`
get_kids() {
local parent_id=$1
docker inspect --format='ID {{.Id}} PAR {{.Parent}}' $(docker images -a -q) | grep "PAR ${parent_id}" | sed -E "s/ID ([^ ]*) PAR ([^ ]*)/\1/g"
}
print_kids() {
@vinicioslc
vinicioslc / flutter-android-cd.yml
Last active April 19, 2024 15:52
Build flutter releases in github actions for production only android for while.
# This is a basic workflow to help you get started with Actions
name: CD Internal-Lane
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
tags:
- "internal-v*.*.*" # on every version tag will build a new android artifact example: v3.1.2+6
jobs: