Skip to content

Instantly share code, notes, and snippets.

View Kamilnaja's full-sized avatar
💭
🐍🔥

Kamil Naja Kamilnaja

💭
🐍🔥
View GitHub Profile
<!DOCTYPE html >
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Using MySQL and PHP with Google Maps</title>
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
app.get('/texts', function (req, res) {
connection.query('SELECT * FROM texts', function (error, results, fields) {
if (error) throw error;
return res.send({error: false, data: results, message: 'Texts list'})
})
});
var express = require('express');
var app = express ();
app.get('/', function(req, res) {
var number = 200;
res.status(number).send("hello World");
});
app.listen(3000);
var http = require("http");
http.createServer(function (req, res) {
res.writeHead(200, {"Content-Type" : "text/plain"});
res.write("witaj świecie");
res.end();
}).listen(3000);
function $(el) {
return document.querySelector(el);
}
document.addEventListener("DOMContentLoaded", function(){
// Handler when the DOM is fully loaded
});
<script>
const e = React.createElement;
ReactDOM.render(
e('div', null, 'Hello World'),
document.getElementById('app')
)
</script>
var Component = createReactClass({
render: function () {
return React.DOM.span(null, "i'm so awesome")
}
});
var ComponentFactory = React.createFactory(Component);
ReactDOM.render(
ComponentFactory(),
var Component = createReactClass({
render: function () {
return React.DOM.span(null, "I'm so custom");
}
});
ReactDOM.render(
React.createElement(Component),
document.getElementById("app")
)
<script type="text/babel">
var P = React.createElement("p", {"className": "name"}, "Hello There");
var root = document.getElementById("root");
ReactDOM.render(P, root, () => console.log("We have just render"));
</script>