Transforme trechos de Awk em imagens que valem a pena compartilhar, sem sair do seu Mac.
Awk one-liners are shared constantly and almost always as text, where the quoting gets mangled on the way.
O Codeshot detecta Awk pelo código que você cola, então não há seletor de linguagem para errar. Aqui está o mesmo trecho em três dos 30 temas inclusos, renderizados com as folhas de estilo do próprio app.
#!/usr/bin/awk -fBEGIN { FS = ","; printf("%-12s %s
", "THEME", "COUNT") }
{ counts[$1]++ }
END {
for (theme in counts)
printf("%-12s %d
", theme, counts[theme])
}
GitHub · escuro
#!/usr/bin/awk -fBEGIN { FS = ","; printf("%-12s %s
", "THEME", "COUNT") }
{ counts[$1]++ }
END {
for (theme in counts)
printf("%-12s %d
", theme, counts[theme])
}
Solarized · escuro
#!/usr/bin/awk -fBEGIN { FS = ","; printf("%-12s %s
", "THEME", "COUNT") }
{ counts[$1]++ }
END {
for (theme in counts)
printf("%-12s %d
", theme, counts[theme])
}
Tokyo Night · escuro
Escolhendo um tema para Awk
If the snippet is a one-liner, put the plain text in the post as well. An awk program people have to retype from a picture will be retyped wrong.
Acertando o tamanho
Deixe a imagem seguir o conteúdo ou fixe uma proporção — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3 ou 3:4 — e exporte em 1×, 2× ou 3× para que continue nítida em telas retina. Copie direto para a área de transferência com ⌘⇧C ou salve com ⌘S.