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
global $wp_subscribe_reloaded; | |
echo "Subscribe old comments<br><br>"; | |
// Get all comments on database | |
$comments = get_comments(array('type'=>'comment')); | |
$added=0; | |
echo "Comments: ".var_dump(count($comments))."<br>"; | |
foreach ($comments as $comment){ | |
$postId=$comment->comment_post_ID; | |
$email=$comment->comment_author_email; | |
if (strpos(email,'YOUR_EMAIL')!==false) continue; |
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
componentDidMount() { | |
window.addEventListener("resize", ()=> { | |
this.updateDimensions(); | |
}); | |
this.updateDimensions(); | |
} | |
updateDimensions() { | |
let w = window, |
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
import React from 'react'; | |
import * as PropTypes from "prop-types"; | |
import Dialog from 'material-ui/Dialog'; | |
import FlatButton from 'material-ui/FlatButton'; | |
import Snackbar from 'material-ui/Snackbar'; | |
import TextField from 'material-ui/TextField'; | |
export default class Context extends React.Component { |
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
/** | |
* Return the name and surname | |
* "Tiago Gouvêa de Oliveira" will return "Tiago Gouvea" | |
* @author TiagoGouvea | |
* @param name | |
* @returns String | |
*/ | |
function nameSurname (name) { | |
name = name.trim(); | |
if (!name) return ''; |
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
fucntion ucWords (str) { | |
str = str.trim(); | |
str = str.toLowerCase().replace(/^[\u00C0-\u1FFF\u2C00-\uD7FF\w]|\s[\u00C0-\u1FFF\u2C00-\uD7FF\w]/g, function (letter) { | |
return letter.toUpperCase(); | |
}); | |
return str; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Assinatura</title> | |
</head> | |
<body> | |
<table cellpadding="0" cellspacing="0" border="0" |
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
<?php | |
/** | |
* WPSEO plugin file. | |
* | |
* @package WPSEO\Admin | |
*/ | |
/** | |
* Represents the proxy for communicating with the database | |
*/ |
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
#!/usr/bin/env bash | |
## Google cloud config | |
PROJECT="node-docker-gcp" | |
ZONE="us-central1-a" | |
## Instance settings | |
INSTANCE_NAME="my-compute-instance" | |
### Instance creation settings |
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
#!/usr/bin/env bash | |
echo -e "\nCreate remote instance" | |
echo -e "\n# 1/2 - Loading and setting options..." | |
## Show commands (if you want to check, uncomment it) | |
#set -x | |
## Stop on errors | |
set -e |
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 http = require('http'); | |
var handleRequest = function(request, response) { | |
response.writeHead(200); | |
response.end("I'm alive"); | |
} | |
var www = http.createServer(handleRequest); | |
var port = process.env.PORT || 8080; | |
www.listen(port, function () { | |
console.log("Node server listening at port "+port); | |
}); |