Skip to content

Instantly share code, notes, and snippets.

View guilhermecomum's full-sized avatar

Guilherme Guerra guilhermecomum

View GitHub Profile
@guilhermecomum
guilhermecomum / external.js
Created February 21, 2022 16:47
External HTML
let content = '<p>blah</p>'
<div className="prose" dangerouslySetInnerHTML={{ __html: content }} />
@guilhermecomum
guilhermecomum / gs2json.js
Last active July 2, 2020 23:00
Google Spreadsheet to JSON
const data = require("./googlespreadsheet.json");
var columns = [];
var rows = {};
for (var i = 0; i < data.feed.entry.length; i++) {
var entry = data.feed.entry[i];
var value = entry.content.$t;
var row = entry["gs$cell"]["row"];
var col = entry["gs$cell"]["col"];
@guilhermecomum
guilhermecomum / pc setup
Last active February 15, 2021 13:47
Pacotes
sudo apt install funcoeszz athena-jot bash-completion net-tools tldr xsel xclip ack aspell aspell-pt-br bash-completion binutils build-essential bzip2 coreutils cowsay curl dialog dictionaries-common diffutils dmidecode emacs fortunes fortunes-br fortunes-min gh git gmrun guake gzip imagemagick lastpass-cli lolcat tmux nitrogen compton py3status
@guilhermecomum
guilhermecomum / screenmirroring.sh
Last active August 8, 2019 09:40
Android screen mirroring
# Source: https://knowitlabs.no/mirroring-your-android-display-to-mac-or-linux-20b2a7043f85
adb shell "while true; do screenrecord --output-format=h264 -; done" | ffplay -framerate 60 -probesize 32 -sync video -
@guilhermecomum
guilhermecomum / 20-intel.conf
Last active July 9, 2021 01:47
Fix brightness control issue with Intel card in Ubuntu and Linux Mint
Now, you have to follow this suggestion given by people all around the world: edit the /etc/default/grub file in super user mode and insert acpi_backlight=none to the GRUB_CMDLINE_LINUX_DEFAULT variable. For example, here is what I have:
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=none"
1
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=none"
After editing this file, run sudo update-grub and reboot. Backlight keys should work now.
You can get rid of the 20-intel.conf file if you have used it.
#source: https://blog.dakwamine.fr/?p=1771
h1 {
color: blue;
}
@guilhermecomum
guilhermecomum / estados_brasileiros.json
Last active November 9, 2017 13:10
Estados Brasileiros JSON
{
"states": [
{ "id": "AC", "name": "Acre" },
{ "id": "AL", "name": "Alagoas" },
{ "id": "AP", "name": "Amapá" },
{ "id": "AM", "name": "Amazonas" },
{ "id": "BA", "name": "Bahia" },
{ "id": "CE", "name": "Ceará" },
{ "id": "DF", "name": "Distrito Federal" },
{ "id": "ES", "name": "Espírito Santo" },
@guilhermecomum
guilhermecomum / 1001albums.md
Created May 6, 2016 11:32 — forked from znseaman/1001albums.md
Pitchfork's 1001 Albums You Must Hear Before You Die
50s
  • Sinatra, Frank – In the Wee Small Hours
  • Presley, Elvis – Elvis Presley (1956)
  • Louvin Brothers – Tragic Songs of Life
  • Prima, Louis – Wildest
  • Domino, Fats – This is Fats
  • Ellington, Duke – At Newport (1956)
  • Sinatra, Frank – Songs for Swingin’ Lovers!
  • Crickets – Chirping…