Skip to content

Instantly share code, notes, and snippets.

tiansial

Block or report user

Report or block tiansial

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View event-blocks.php
<?php
/**
* Event Blocks
*
* @author ThemeBoy
* @package SportsPress/Templates
* @version 1.9.8
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
View event-blocks.php
<?php
/**
* Event Blocks
*
* @author ThemeBoy
* @package SportsPress/Templates
* @version 1.9.8
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
View PHP
<?php
/**
* Event Blocks
*
* @author ThemeBoy
* @package SportsPress/Templates
* @version 1.9.8
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Live Robot</title>
</head>
<body>
<p class="start">Start Your Robot Please.</p>
<div id="data"></div>
<script src="https://cdn.socket.io/socket.io-1.2.0.js"></script>
View gist:867648bfe4d8d2591c4a
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Live Robot</title>
</head>
<body>
<p class="start">Start Your Robot Please.</p>
<div id="data"></div>
<script src="https://cdn.socket.io/socket.io-1.2.0.js"></script>
View gist:ad91dcd39124d803a1eb
<h3>Email ID {{{email._id}}}</h3>
<form action="/emails/{{{email._id}}}/edit" method='post' name='updateemail' enctype='application/x-www-form-urlencoded'>
<p>Email: <input id="inputEmail" type="text" value='{{{email.email}}}' name='email'></p>
<p>Password: <input id="inputPassword" type="text" value='{{{email.password}}}' name='password'></p>
<p>Serviço: <input id="inputServico" type="text" value='{{{email.servico}}}' name='servico'></p>
<p><input type="hidden" value="PUT" name="_method"></p>
<p><button type="submit" id="btnSubmit">Update</button></p>
</form>
View gist:2ce28e3c9a25b251ff7c
var express = require('express'),
router = express.Router(),
mongoose = require('mongoose'), //mongo connection
bodyParser = require('body-parser'), //parses information from POST
methodOverride = require('method-override'); //used to manipulate POST
router.use(bodyParser.urlencoded({ extended: true }))
router.use(methodOverride(function(req, res){
View gist:42fd278c3a43c393ab19
put(function(req, res) {
// Get our REST or form values. These rely on the "name" attributes
var email = req.body.email;
var password = req.body.password;
var servico = req.body.servico;
//find the document by ID
mongoose.model('Email').findById(req.id, function (err, email) {
//update it
email.update({
View gist:555039ad6a71f4ea274e
var request = require('request');
function(req, res) {
request.get('http://api.openweathermap.org/data/2.5/weather?q=Viseu,pt', function(err, response, body) {
if (!err && response.statusCode == 200) {
var locals = JSON.parse(body);
res.render('index', locals);
}
}
}
View gist:af60c3c4c70b7f645f0a
<!DOCTYPE html>
<html>
<head>
<link href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/shift.css" rel="stylesheet">
<link rel="stylesheet" href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/bootstrap.css">
<link rel="stylesheet" href="main.css">
</head>
You can’t perform that action at this time.