Skip to content

Instantly share code, notes, and snippets.

View Kamilnaja's full-sized avatar
💭
🐍🔥

Kamil Naja Kamilnaja

💭
🐍🔥
View GitHub Profile
var express = require('express');
var app = express ();
app.get('/', function(req, res) {
var number = 200;
res.status(number).send("hello World");
});
app.listen(3000);
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'})
})
});
<!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%;
for (var i = 0, max = markers.length; i < max; i++) {
var miejscowosc = markers[i].getAttribute("miejscowosc"),
point = new google.maps.LatLng(
parseFloat(markers[i].getAttribute("lat")),
parseFloat(markers[i].getAttribute("lgt"))
),
marker = new google.maps.Marker({
map: map,
position: point,
angular.module('my-app', [])
.controller('myCtrl', function ($scope, $http) {
$scope.myFunc = function () {
console.log($scope.boxes);
// $http.post('index.php', JSON.stringify($scope.boxes));
var request = $http({
method: "post",
url: window.location.href + "index.php",
data: {
app.get('/api/texts', function (req, res) {
connection.query('ALTER TABLE texts MODIFY COLUMN * TEXT CHARACTER SET utf8', function (error, results, fields) {
connection.query('SELECT * FROM texts', function (error, results, fields) {
if (error) throw error;
return res.send({error: false, data: results, message: 'Texts list'})
})
})
});
<?php $myquery = new WP_Query( 'category_name=menu-items' ); ?>
<?php while ( $myquery->have_posts() ) : $myquery->the_post(); ?>
<li>
<?php the_post_thumbnail(); ?>
<a href="#<?php the_permalink() ?>">
<?php the_title(); ?>
<?php the_content(); ?>
</a>
</li>
@Kamilnaja
Kamilnaja / Karma - test class
Created July 9, 2017 11:34
Karma - test class
it('should accept values in the constructor', () => {
let todo = new Todo({
title: 'hello',
complete: true
});
expect(todo.title).toEqual('hello');
expect(todo.complete).toEqual(true);
});
.text-variables > .col-md-4 {
&:nth-child(3n + 1) {
clear: both;
}
}