Skip to content

Instantly share code, notes, and snippets.

View thiagobraga's full-sized avatar

Thiago Braga thiagobraga

View GitHub Profile
@thiagobraga
thiagobraga / organize-path-environment-variable.md
Last active October 24, 2020 13:13
Manage PATH environment variable in a more organized way #Linux

Organize PATH environment variable

The idea is to use an array, PATHS for example, to store the folders needed to be in PATH, and use the method join(), taken from this post, to merge correctly all paths.

#!/bin/bash

# Define PATH environment variable in a more organized way.
# ------------------------------------------------------------------------------
PATHS=(
@thiagobraga
thiagobraga / setxkbmap-freezes-gnome.md
Last active October 24, 2020 13:12
setxkbmap freezes Gnome at first key press on Ubuntu 20.04 #Linux

setxkbmap freezes Gnome at first key press

Just before Gnome shell is completely started, Ubuntu freezes completely, nothing is clickable. Only mouse moves. It is possible to note that clock freezes to, the seconds stopped. When it returns, I can see this entries on /var/log/syslog:

Oct 24 10:04:03 thiago-ubuntu gnome-shell[2183]: Window manager warning: Overwriting existing binding of keysym ffb6 with keysym ffb6 (keycode 55).
Oct 24 10:04:03 thiago-ubuntu gnome-shell[2183]: Window manager warning: Overwriting existing binding of keysym ffb7 with keysym ffb7 (keycode 4f).
Oct 24 10:04:03 thiago-ubuntu gnome-shell[2183]: Window manager warning: Overwriting existing binding of keysym ffb1 with keysym ffb1 (keycode 57).
Oct 24 10:04:03 thiago-ubuntu gnome-shell[2183]: Window manager warning: Overwriting existing binding of keysym ffb2 with keysym ffb2 (keycode 58).
Oct 24 10:04:03 thiago-ubuntu gnome-shell[2183]: Window manager warning: Overwriting existing binding of keysym ffb1 with keysym ffb1 (
@thiagobraga
thiagobraga / getInstagramMedia.js
Last active October 23, 2020 19:06
Get media from the new Instagram API (July 2020)
/**
* Get instagram photos with Instagram API.
*
* The Instagram API has a limit of 240 requests per hour. With that,
* it was necessary to save the responses in jsonbox.io free service to serve
* the contents within that 1 hour. LocalStorage is also used to store the
* response in user browser, making access to the website faster.
*/
(async () => {
let photos;
@thiagobraga
thiagobraga / .hyper.js
Created October 18, 2020 13:36
HyperJS backup settings
module.exports = {
config: {
fontFamily: 'Fira Code',
fontSize: 12,
fontWeight: 'normal',
fontWeightBold: 'bold',
backgroundColor: '#000',
borderColor: '#333',
foregroundColor: '#fff',
selectionColor: 'rgba(255,255,255,0.075)',
@thiagobraga
thiagobraga / windows-terminal.json
Created October 18, 2020 05:51
Windows Terminal backup config
{
"globals": {
"alwaysShowTabs": true,
"defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
"initialCols": 90,
"initialRows": 25,
"requestedTheme": "system",
"showTabsInTitlebar": true,
"showTerminalTitleInTitlebar": true,
"wordDelimiters": " ./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}~?\u2502",
@thiagobraga
thiagobraga / thiagobraga.org-color-pallette.txt
Last active August 15, 2020 03:42
Color pallette for thiagobraga.org #Design
#1E0233
#342D50
#484E5D
#756477
#895575
#EDA7A7
#FFB6B6
#DECFCF
#E7D3CC
#F3F1E7
@thiagobraga
thiagobraga / colors-one-dark.md
Created August 11, 2020 19:19
Colors for Apps Script One Dark
codeBackGround              = #31343f
generalBackGround           = #1e2127
generalText                 = #d8dee9
textSelectionBackground     = rgba(92,99,112,.5)
border                      = #242627
listItem                    = #bbb
listItemBackground          = #4b6eaf
listItemSelected            = #ccc
listItemBackgroundSelected  = rgba(92,99,112,.25)
@thiagobraga
thiagobraga / windows-terminal.json
Last active April 5, 2020 03:23
Terminal: settings with Nord theme #Windows
{
"globals": {
"alwaysShowTabs": true,
"defaultProfile": "{c6eaf9f4-32a7-5fdc-b5cf-066e8a4b1e40}",
"initialCols": 90,
"initialRows": 25,
"requestedTheme": "system",
"showTabsInTitlebar": true,
"showTerminalTitleInTitlebar": true,
"wordDelimiters": " ./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}~?\u2502",
@thiagobraga
thiagobraga / great-suspender-whitelist.txt
Last active April 5, 2020 03:22
Extensions: The Great Suspender whitelist #Chrome
/^https?://local/
@thiagobraga
thiagobraga / package.json
Created November 20, 2019 14:22
BrowserSync config in package.json
{
"browserSync": {
"https": {
"key": "./cert/localhost-key.pem",
"cert": "./cert/localhost.pem"
},
"files": [
"dist/project.{css,js}"
],
"logSnippet": false,