Skip to content

Instantly share code, notes, and snippets.

View eduardopintor's full-sized avatar

Eduardo Pintor eduardopintor

View GitHub Profile
@eduardopintor
eduardopintor / index.html
Created January 28, 2022 14:42 — forked from gilcierweb/index.html
Component Vue.js search CEP or Zip code
<!doctype html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="author"
content="GilcierWeb - Web Developer - gilcierweb@gmail.com - gilcier06@yahoo.com.br - Sites, Sistemas para Web, E-commerce, Manutenção de Sites."/>
<meta name="doc-rights" content="Private"/>
@eduardopintor
eduardopintor / linkedin.js
Created January 28, 2022 13:55 — forked from CViniciusSDias/linkedin.js
Aceitar todos os convites do LinkedIn
document
.querySelectorAll('button[aria-label^="Aceitar o convite de"]')
.forEach((btn, i) => setTimeout(() => btn.click(), i + 500));
@eduardopintor
eduardopintor / 00_manage_frontend_user_profiles_from_twill.md
Created January 19, 2022 16:26
Basic Twill & Laravel Breeze integration

Manage frontend user profiles from Twill

This is a simple solution to allow site administrators to manage frontend user profiles from the CMS. It can be used as a starting point to implement a user approval workflow and content access restrictions.

Objectives:

  • Add a Profiles section to the CMS for site administrators
  • Automatically create and assign Profile records to users upon registration
@eduardopintor
eduardopintor / amp-google-tag-manager.php
Created October 30, 2020 15:05 — forked from westonruter/amp-google-tag-manager.php
Plugin demonstrating how to inject GTM for the AMP plugin, in response to support forum topic: https://wordpress.org/support/topic/amp-with-google-tag-manager/
<?php
/**
* Plugin Name: AMP Google Tag Manager
*
* @package AMP_Google_Tag_Manager
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*
* @wordpress-plugin
@eduardopintor
eduardopintor / fix-wordpress-permissions.sh
Created August 5, 2020 18:01 — 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>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@eduardopintor
eduardopintor / gist:0d4f335a94796cafd5eaf5a07f6671ac
Created June 23, 2020 18:23
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin [repository]
git push -u origin --all
git push -u origin --tags
@eduardopintor
eduardopintor / terminal-colors-branch
Created November 27, 2019 22:07 — forked from danielalvarenga/terminal-colors-branch.sh
Show branch in terminal Ubuntu
# Add in ~/.bashrc or ~/.bash_profile
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RED="\[\033[01;31m\]"
YELLOW="\[\033[01;33m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
NO_COLOR="\[\033[00m\]"
@eduardopintor
eduardopintor / local-dev-remote-images.php
Last active September 3, 2019 04:47 — forked from chuckreynolds/local-dev-remote-images.php
WordPress local dev environment plugin and config to use images from a live server instead of looking on local url path
<?php
/*
* Plugin Name: Local Dev Remote Images
* Description: this will allow a local dev environment to call all images in uploads from a remote server
* Version: 0.1
* License: GPL
* Author: @chuckreynolds
* Author URI: https://chuckreynolds.us
*/
@eduardopintor
eduardopintor / common-terminal-commands.md
Created September 3, 2019 04:34 — forked from chuckreynolds/common-terminal-commands.md
Common linux / terminal commands I always use but forget. So fuck it I'm saving em here

common terminal commands

ubuntu updates & clean

  • sudo apt update && sudo apt upgrade -y
  • sudo apt autoremove && sudo apt clean

copy mac public ssh key

  • pbcopy < ~/.ssh/id_rsa.pub

edit host file and flush dns after

UPDATE jp_blogs SET domain='blog.jovempan.uol.com.br';
UPDATE jp_site SET domain='blog.jovempan.uol.com.br';
UPDATE jp_options SET option_value='http://blog.jovempan.uol.com.br' WHERE option_name='siteurl';
UPDATE jp_options SET option_value='http://blog.jovempan.uol.com.br' WHERE option_name='home';
UPDATE jp_1_options SET option_value=replace(option_value, 'http://blog.jovempan.uol.com.br', 'http://blog.jovempan.uol.com.br') WHERE option_name='siteurl';
UPDATE jp_1_options SET option_value=replace(option_value, 'https://blog.jovempan.uol.com.br', 'http://blog.jovempan.uol.com.br') WHERE option_name='siteurl';
UPDATE jp_1_options SET option_value=replace(option_value, 'http://blog.jovempan.uol.com.br', 'http://blog.jovempan.uol.com.br') WHERE option_name='home';