Skip to content

Instantly share code, notes, and snippets.

View marlonklc's full-sized avatar
🎯
Focusing

Marlon Klagenberg marlonklc

🎯
Focusing
View GitHub Profile
@diegopacheco
diegopacheco / having-fun-with-zig.md
Last active March 4, 2024 08:51
Having Fun with Zig

Tiny Zig Essay

created: 12.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Zig

  • Lightning Fast, really!
  • No Hidden control flows
@marlonklc
marlonklc / _youtube-subtitles-script.js
Last active April 30, 2023 02:41
youtube auto translate subtitles using google translator API
const SOURCE_LANGUAGE = "en";
const TARGET_LANGUAGE = "pt-br";
const button = document.createElement('button');
button.textContent = 'copy and translate';
button.addEventListener('click', () => {
const subtitleElement = document.getElementsByClassName('captions-text')[0];
const selectedTexts = Array.from(subtitleElement.children)
.map(i => i.children[0])
.map(i => i.innerHTML.replace('<br>', '').replace('&nbsp;', ''))
.join(' ');
@diegomais
diegomais / script.js
Created January 31, 2021 20:43
Reverse the formatting by Intl.NumberFormat in JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Intl.NumberFormat</title>
<script type="text/javascript" charset="UTF-8" src="script.js"></script>
</head>
<body>
<output id=output></output>
@yogendra
yogendra / README.md
Last active April 8, 2020 07:57 — forked from dwallraff/jumpbox.sh
Personal jumpbox bootstrap script -- curl -L dwallraff.com/jumpbox | bash

Jumpbox

This gist initialized a jumpbox

@yogendra
yogendra / kubernetes.md
Created November 15, 2018 17:02 — forked from carlessanagustin/kubernetes.md
Kubernetes tutorial steps

1. Create cluster

Cluster up and running

minikube version
minikube start
kubectl version
@diegopacheco
diegopacheco / The Technical Interview Cheat Sheet.md
Last active January 8, 2020 10:45 — forked from kod3r/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@diegopacheco
diegopacheco / ca-expr.md
Last active January 8, 2020 10:44
Experiencias com a Cultura Americana no Vale do Silicio, California - EUA 2015
  • É muito seguro
  • AS pessoas fazem as coisas certas pq é certo
  • É muito limpo
  • Muitas pessoas vivem nos suburbios
  • Muitos tem 2-3 filhos
  • Cultura de Parques
  • Festas de crianças em parques
  • Self-Service em tudo - até no supermercado - fast checkout
  • ODEIAM esperar - compra Cafe ou pizza online com apenas pick up
  • Meetups
@avelino
avelino / gist:3188137
Created July 27, 2012 13:49
shell script, como colorir o retorno do seu código
echo -e " \033[0;30m Preto \033[0m --> 0;30 "
echo -e " \033[0;31m Vermelho \033[0m --> 0;31 "
echo -e " \033[0;32m Verde \033[0m --> 0;32 "
echo -e " \033[0;33m Marrom \033[0m --> 0;33 "
echo -e " \033[0;34m Azul \033[0m --> 0;34 "
echo -e " \033[0;35m Purple \033[0m --> 0;35 "
echo -e " \033[0;36m Cyan \033[0m --> 0;36 "
echo -e " \033[0;37m Cinza Claro \033[0m --> 0;37 "
echo -e " \033[1;30m Preto Acinzentado \033[0m --> 1;30 "
echo -e " \033[1;31m Vermelho Claro \033[0m --> 1;31 "