Skip to content

Instantly share code, notes, and snippets.

View pedrorvidal's full-sized avatar

Pedro Vidal pedrorvidal

  • Porto Alegre, Brazil.
View GitHub Profile
@pedrorvidal
pedrorvidal / work-with-multiple-github-accounts.md
Created February 14, 2024 15:50 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@pedrorvidal
pedrorvidal / multiple_ssh_setting.md
Created August 10, 2022 14:53 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cidade por Estado</title>
</head>
<body>
<select name="estados" id="estados"></select>
@pedrorvidal
pedrorvidal / .htaccess
Created April 13, 2021 18:18 — forked from RafaelFunchal/.htaccess
Exclude the files ajax, upload and WP CRON scripts from authentication
# Exclude the files ajax, upload and WP CRON scripts from authentication
<FilesMatch "(admin-ajax\.php|media-upload\.php|async-upload\.php|wp-cron\.php|xmlrpc\.php)$">
Order allow,deny
Allow from all
Satisfy any
</FilesMatch>
@pedrorvidal
pedrorvidal / brazil-cities-states-en.json
Created September 6, 2019 13:37 — forked from djalmaaraujo/brazil-cities-states-en.json
Cidades e estados brasileiros JSON & Javascript Object exported / Brazilian States and Cities in JSON or JS/Javascript
{
"states": [
{
"uf": "AC",
"name": "Acre",
"cities": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@pedrorvidal
pedrorvidal / tmux-cheatsheet.markdown
Created August 14, 2019 16:42 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@pedrorvidal
pedrorvidal / .tmux.conf
Created August 14, 2019 16:23 — forked from subfuzion/.tmux.conf
My .tmux.conf for tmux 2.1 (with fixes for mouse breakage)
# Inspirations:
# http://mutelight.org/practical-tmux
# http://zanshin.net/2013/09/05/my-tmux-configuration/
# http://files.floriancrouzat.net/dotfiles/.tmux.conf
# http://stackoverflow.com/questions/9628435/tmux-status-bar-configuration
# https://github.com/Lokaltog/powerline
# https://github.com/remiprev/teamocil
# http://superuser.com/questions/74492/whats-the-best-prefix-escape-sequence-for-screen-or-tmux
# http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/
#
@pedrorvidal
pedrorvidal / functions.php
Created July 28, 2019 19:08
Estados e cidades brasileiras populados em uma taxonomia do wordpress.
<?php
// É aconselhável criar um backup do banco antes
// crie a taxonomia cidade na functions do tema
add_action('init', 'register_locations');
function register_locations() {
register_taxonomy( 'cidade',array (
0 => 'locais',
),
array( 'hierarchical' => true,
@pedrorvidal
pedrorvidal / spotify_keybindings
Created July 4, 2017 19:16 — forked from jbonney/spotify_keybindings
Spotify - Linux key bindings. From XFCE / Ubuntu keyboard shortcuts configuration, assign the control command to their key. http://shkspr.mobi/blog/2011/12/linux-spotify-keybindings/
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" XF86AudioPlay
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop" XF86AudioStop
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" XF86AudioNext
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" XF86AudioPrevious
@pedrorvidal
pedrorvidal / fix-wordpress-permissions.sh
Last active March 3, 2017 01:15 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
#
# RODAR USANDO ./fix-wordpress-permissions.sh <nome_da_pasta_wordpress>
#