Skip to content

Instantly share code, notes, and snippets.

View oliveira-andre's full-sized avatar
🖲️
Coding

André Oliveira oliveira-andre

🖲️
Coding
View GitHub Profile
@oliveira-andre
oliveira-andre / tmux_commands_cheat_sheet.md
Last active May 30, 2020 18:18
tmux commands cheat sheet

the prefix is control+b, before all commands run it.

about session

  • , => rename current session

windows

  • c => new window
  • n => next window
  • p => prevous window
@oliveira-andre
oliveira-andre / gem_management.md
Last active November 22, 2022 20:15
gem management ruby

build the spec file

gem build gemname.spec

extract gem files to current path

gem unpack 
@oliveira-andre
oliveira-andre / install_font_awesome_rails.md
Created June 24, 2020 01:03
rails install font awesome

run on terminal

yarn add @fortawesome/fontawesome-free

import on application.scss

$fa-font-path: '@fortawesome/fontawesome-free/webfonts';
@oliveira-andre
oliveira-andre / enable_wol.md
Last active March 26, 2025 08:45
how to enable wake on lan in mac os and linux to power on your pc by alexa

MAC OS

  • open system preferences
  • open energy saver
  • click on power adapter
  • enable the wake for wi-fi network

this should work only on sleep of mac

Linux

wait for it

wait-for-it.sh

#!/bin/sh

set -e

host="$1"
@oliveira-andre
oliveira-andre / change_author_commits.md
Created August 12, 2020 17:58
script to change old email on all commits and put new email

script to change old email on all commits and put new email

changing commits

git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@oliveira-andre
oliveira-andre / foce_high_resolution_monitor.md
Created August 17, 2020 13:31
adding a higher resolution to monitor

force high resolution

calculates de VESA CVT(Cordinates Video Timing)

cvt 1920 1080

adding new mode with xrandr

sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
@oliveira-andre
oliveira-andre / .hyper.js
Created August 19, 2020 05:28
.hyper.js configuration
module.exports = {
config: {
updateChannel: 'stable',
// default font size in pixels for all tabs
fontSize: 10,
// font family with optional fallbacks
fontFamily: '"Fira Code", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
@oliveira-andre
oliveira-andre / docker_up_rancher.md
Last active September 30, 2020 01:35
using docker to up rancher

Using docker to up rancher

ssh on machine

allow udp to ports 500 and 4500

sudo ufw allow 500/udp
#!/usr/bin/python3
import requests
import json
from bs4 import BeautifulSoup
def template_html():
url = 'https://www.nuuvem.com/catalog/price/promo/sort/bestselling/sort-mode/desc';
response = requests.get(url);