Skip to content

Instantly share code, notes, and snippets.

View helton's full-sized avatar
🏠
Working from home

Helton Carlos de Souza helton

🏠
Working from home
View GitHub Profile
@helton
helton / Kubernetes.md
Created February 10, 2020 01:08
Kubernetes - Notes and Commands

Kubernetes

  • It's a container orchestration
    • Many servers act like one
  • Released in 2015
  • Runs on top of Docker
  • Provides CLI/API to manage container across servers
    • kubectl
  • Services
  • Clouds: Google Engine, etc
@helton
helton / list-all-jenkins-plugins.groovy
Created February 8, 2020 23:36
List all Jenkins plugins sorted by name - Open http://JENKINS_HOST:PORT/script and run this script
new ArrayList(Jenkins.instance.pluginManager.plugins)
.sort { it.getShortName() }
.each {
plugin ->
println ("${plugin.getShortName()}:${plugin.getVersion()}")
}
@helton
helton / _credits.md
Last active November 12, 2024 21:23
Charadas
@helton
helton / quizlet-simple-markdown.js
Created May 6, 2018 22:06
Simple Markdown for Quizlet description (info page)
const markdown = raw => {
const createBulletList = content => {
const regex = /- /gi
return content.match(regex).reduce((body, bullet) => body.replace(bullet, `<pre style="display: inline-block">• </pre>`), content)
}
const createLinks = content => {
const regex = /\[(.*?)\]\((https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)(\?hl=[a-z]{2})?)\)/gi
let result = content
let match = regex.exec(content)
while (match !== null) {
@helton
helton / remove-medium-login-popup.js
Last active May 2, 2018 16:43
Remove forced login popups (Quora, Medium, LinkedIn)
(function() {
const dialogNode = document.querySelector('.overlay.overlay--lighter')
if (dialogNode) {
document.body.style.overflow = 'auto'
dialogNode.remove()
}
})()
@helton
helton / db.json
Created December 11, 2017 12:30
Fetch API Test - POST (make sure you start json-server => https://github.com/typicode/json-server)
{
"posts": [
{ "id": 1, "title": "json-server", "author": "typicode" }
],
"comments": [
{ "id": 1, "body": "some comment", "postId": 1 }
],
"profile": { "name": "typicode" }
}
@helton
helton / styles.less
Last active May 15, 2018 05:53
Atom Configuration for JavaScript (JSX) with Fira Code as Font Ligature
//Custom configuration
atom-text-editor {
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
font-family: "Operator Mono";
font-size: 16px;
font-weight: 500;
line-height: 1.5;
}
@helton
helton / launch.json
Created August 23, 2017 23:56 — forked from auchenberg/launch.json
VSCode + React debug config
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/src"
}
@helton
helton / total-mensal-zap.js
Last active August 21, 2017 18:53
Calcula o total mensal de apartamentos do Zap Imóveis
function reaisStrToInteger(reais) {
return parseInt(reais
.match(/R\$ ([0-9]+(\.[0-9]+)?)$/)[1]
.replace('.', ''));
}
if (window.location.href.match(/https:\/\/www\.zapimoveis\.com\.br\/oferta\/(venda|aluguel)\+apartamento/)) {
const aluguel = reaisStrToInteger(document.querySelector('.value-ficha').innerText.replace(/\n/g, ''));
let iptu = 0;
let condominio = 0;
@helton
helton / get-video-links-codeschool.js
Last active August 19, 2017 22:29
Get Video Links (in HD 720p) from CodeSchool