Skip to content

Instantly share code, notes, and snippets.

View felipemotabr's full-sized avatar
๐Ÿ‘‹
Hi there

Felipe Mota felipemotabr

๐Ÿ‘‹
Hi there
View GitHub Profile
@felipemotabr
felipemotabr / settings.json
Last active May 23, 2024 01:03
integrar o CMD do Laragon no VS CODE
{
"workbench.colorTheme": "Default Dark Modern",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
@felipemotabr
felipemotabr / key_generator.py
Created January 9, 2021 02:04
key generator with python
import random
class Key:
def __init__(self, key=''):
if key == '':
self.key = self.generate()
else:
self.key = key.lower()
@felipemotabr
felipemotabr / upload_image.py
Created January 9, 2021 01:21
Send images anonymously with imgur using python
from imgurpython import ImgurClient
image_path = 'cat.jpg'
client_id = ''
client_secret = ''
client = ImgurClient(client_id, client_secret)
try:
image = client.upload_from_path(image_path, config=None, anon=True)
@felipemotabr
felipemotabr / download_file_from_browser.py
Last active January 9, 2021 01:17
Selenium Webdriver with headless options
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import os
options = Options()
options.add_argument("--headless")
options.add_argument("--window-size=1920,1080")
driver = webdriver.Chrome(options=options)
@felipemotabr
felipemotabr / README.md
Last active January 5, 2021 16:38
How to Create a WordPress Single Post Template

Creating a single post template free with Elementor

@felipemotabr
felipemotabr / gist:c9e18f501259db2f08d54fbe26453095
Created June 8, 2020 21:43 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@felipemotabr
felipemotabr / functions.php
Last active June 8, 2020 00:36
Wordpress: Add Widget to Social Media
// Adds widget
class Social_Widget extends WP_Widget {
function __construct() {
parent::__construct(
'redessociais_widget',
esc_html__( 'Social Media', 'textdomain' ),
array( 'description' => esc_html__( 'Social Media Links', 'textdomain' ), ) // Args
);
@felipemotabr
felipemotabr / functions.php
Last active March 7, 2019 05:33
Wordpress: String replace
add_action('wp_footer', 'replace_this');
function replace_this(){
?>
<script>
var myExpression = document.getElementById("masthead").innerHTML; //Find ID
var newExpression = myExpression.replace("View your shopping cart", "Carrinho"); //Find expression and exchange
document.getElementById("masthead").innerHTML = newExpression; //Print on screen
</script>
@felipemotabr
felipemotabr / meta-tags.md
Created December 2, 2018 00:27 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@felipemotabr
felipemotabr / functions.php
Created November 21, 2018 04:13
Include custom taxonomy term in search
// search all taxonomies, based on: http://projects.jesseheap.com/all-projects/wordpress-plugin-tag-search-in-wordpress-23
function atom_search_where($where){
global $wpdb;
if (is_search())
$where .= "OR (t.name LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')";
return $where;
}
function atom_search_join($join){