This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="related-posts"> | |
<?php | |
$terms = get_the_terms( $post->ID , 'genero'); //genero é a taxonomia que criei aqui | |
if ( $terms && ! is_wp_error( $terms ) ) { | |
$slugs = array(); | |
foreach ( $terms as $term ) { | |
$slugs[] = $term->term_id; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var node = document.createElement("LI"); // Create a <li> node | |
var textnode = document.createTextNode("Water"); // Create a text node | |
node.appendChild(textnode); // Append the text to <li> | |
document.getElementById("myList").appendChild(node); // Append <li> to <ul> with id="myList" | |
var teste = document.querySelector("#teste"); | |
var element = document.getElementById("element-id"); | |
element.outerHTML = ""; | |
delete element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/bash-git-prompt/gitprompt.sh | |
GIT_PROMPT_ONLY_IN_REPO=0 | |
GIT_PROMPT_THEME=Single_line | |
[[ -s "/home/rodrigo/.gvm/scripts/gvm" ]] && source "/home/rodrigo/.gvm/scripts/gvm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Softwares and setting for the linux in the first use | |
---------------- | |
sudo apt-get update | |
sudo apt-get install build-essential git | |
-- Node -- | |
sudo apt-get install nodejs npm | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
-- Docker --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'get_post_metadata', function ( $value, $post_id, $meta_key, $single ) { | |
if ( $meta_key === '_thumbnail_id' ) { | |
$url_thumbnail_external = get_post_meta( $post_id ,'thumbnail_external', true ); | |
if( !empty($url_thumbnail_external) ){ | |
return "ext-" . $post_id; | |
} | |
} | |
return $value; | |
}, 10, 4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// User config | |
"scroll_past_end": true, //infinite scroll | |
"open_files_in_new_window": false, //terminal open in same window | |
"tab_size": 4, | |
"translate_tabs_to_spaces": false, | |
"word_wrap": "false" | |
// Key binding | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Wordpress Pool - Random Bot" | |
votes=0 | |
while true; do | |
curl 'https://yoursite.com/wp-admin/admin-ajax.php' --data 'param1=value1¶m2=value2' --compressed | |
(( votes++ )) | |
timeSleep=$(( ( RANDOM % 60 ) * 3 )) # zero to three minutes... | |
echo "Votes: ${votes}" | |
echo "Next vote in ${timeSleep} seconds..." | |
sleep ${timeSleep} # Sleep 3 minutes or less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//JUMPTHROW BIND | |
alias "+jumpthrow" "+jump;-attack" | |
alias "-jumpthrow" "-jump" | |
bind "mouse5" "+jumpthrow" | |
/Bind para ver a bomba na fumaça - Game instructor | |
alias "+use_and_see_bomb_by_pink" "+use; gameinstructor_enable 1" | |
alias "-use_and_see_bomb_by_pink" "-use; gameinstructor_enable 0" | |
bind "e" "+use_and_see_bomb_by_pink" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
const ( | |
MIN = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Router | |
// ----------- | |
func SampleRouter(ctx context.Context) *echo.Echo { | |
e := echo.New() | |
e.Use(defaultMiddlewares(ctx)...) | |
e.Use(em.AddTrailingSlash()) | |
e.GET("/sample/test", echo.WrapHandler(http.HandlerFunc(home.Handle))) //Handle(w http.ResponseWriter, r *http.Request) | |
return e |
OlderNewer