Skip to content

Instantly share code, notes, and snippets.

View henrycunh's full-sized avatar
😮‍💨

henrycunh henrycunh

😮‍💨
View GitHub Profile
@henrycunh
henrycunh / twitter-boost.js
Created December 1, 2022 19:38
blue checkmarks are hella boring
let header = null
function getHeader () {
if (header !== null) {
createButton()
return
} else {
header = document.querySelector('header')
setTimeout(getHeader, 100)
}
@henrycunh
henrycunh / serial-number.sh
Created March 8, 2022 21:25
Get the serial number of a Mac from terminal
system_profiler SPHardwareDataType | grep Serial | cut -d':' -f2 | sed 's/ //g'
@henrycunh
henrycunh / release.mjs
Created February 10, 2022 13:41
releasing a new version with zx + fsxx
import { $, argv, chalk } from 'zx'
import { io, read } from 'fsxx'
$.verbose = false
io.json.spaces = 4
const lastTag = `${await $`git tag | sort -V | tail -n 1`}`.trim()
const { _: [, type] } = argv
if (type === undefined) {
@henrycunh
henrycunh / delete-cloudflare-access-applications.sh
Last active December 29, 2021 16:07
Deleting Cloudflare Access applications
#!/bin/bash
# get list of applications from arguments
APPLICATIONS=$@
# if no applications are specified, throw error
if [ -z "$APPLICATIONS" ]; then
echo "[error] No applications specified."
exit 1
fi
@henrycunh
henrycunh / _responsive.scss
Created October 21, 2021 14:01
Responsiveness SASS mixins
@mixin support($size) {
@if $size == phone {
@media (max-width: 599px) { @content; }
} @else if $size == tablet-portrait {
@media (min-width: 600px) { @content; }
} @else if $size == tablet-landscape {
@media (min-width: 900px) { @content; }
} @else if $size == desktop {
@media (min-width: 1200px) { @content; }
} @else if $size == big-desktop {
@henrycunh
henrycunh / settings.json
Created January 28, 2021 14:41
Windows Terminal Configuration
// This file was initially generated by Windows Terminal 1.0.1811.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@henrycunh
henrycunh / amongraph.py
Last active October 23, 2020 22:01
te amo fessô diego
import sys
class Graph():
def __init__(self, vertices):
self.vertices = vertices
self.graph = [[0 for column in range(vertices)]
for row in range(vertices)]
def list_distances(self, dist):
for node in range(self.vertices):
@henrycunh
henrycunh / README.md
Last active December 15, 2019 16:17
Useful Docker Functions
@henrycunh
henrycunh / docker.fish
Created December 15, 2019 13:33
Docker Fish Bonanza
function dps
docker ps $argv
end
function dls
docker images $argv
end
function dstop
docker stop (docker ps -q)
@henrycunh
henrycunh / namecount.json
Last active June 13, 2019 02:23
UFSCAR Name Count
[["lucas",303],["gabriel",250],["pedro",240],["silva",229],["oliveira",219],["guilherme",217],["de",215],["santos",201],["joao",198],["julia",163],["bruno",162],["henrique",161],["matheus",159],["ana",153],["vinicius",152],["rafael",147],["leticia",145],["souza",144],["gustavo",144],["felipe",143],["victor",142],["leonardo",135],["gabriela",133],["rodrigues",131],["mariana",113],["pereira",111],["vitor",104],["bruna",103],["ferreira",102],["lima",99],["fernanda",99],["andre",99],["maria",97],["amanda",95],["beatriz",94],["eduardo",94],["martins",91],["paulo",91],["caio",90],["carolina",85],["camila",82],["ribeiro",81],["fernando",80],["alves",79],["luiz",74],["thiago",71],["almeida",69],["carvalho",66],["daniel",66],["rodrigo",65],["lopes",65],["laura",64],["carlos",64],["mateus",63],["natalia",63],["larissa",62],["augusto",60],["fernandes",60],["costa",59],["gomes",59],["goncalves",59],["da",58],["isabela",57],["juliana",56],["luis",55],["caroline",55],["marcos",54],["bianca",54],["jessica",54],["garcia",52]