Skip to content

Instantly share code, notes, and snippets.

View VasilSlavchev's full-sized avatar

Vasil Slavchev VasilSlavchev

View GitHub Profile
@VasilSlavchev
VasilSlavchev / meta-tags.html
Created October 16, 2019 12:48 — forked from benwo/meta-tags.html
Standard meta tags and meta image tags (and sizes).
<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/Organization" lang="en">
<head>
<!-- Settings -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Search Engines -->
@VasilSlavchev
VasilSlavchev / README-Template.md
Created August 21, 2019 14:24 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@VasilSlavchev
VasilSlavchev / PHP OOP Connection.php
Created April 4, 2017 11:04
PHP OOP Connection.php
class Database {
public $conn;
protected $hostname;
protected $username;
protected $password;
protected $dbname;
public function __construct ( $hostname, $username, $password, $dbname ) {
global $conn;
$this->conn = $conn;
@VasilSlavchev
VasilSlavchev / db-connect-test.php
Created April 4, 2017 09:49 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@VasilSlavchev
VasilSlavchev / palindrome.js
Created March 2, 2017 15:55 — forked from bagaag/palindrome.js
Palindrome Test in JavaScript
// reverse word and compare
function isPalindrome1(word) {
var s = '';
for (var i=word.length-1; i>=0; i--) {
s += word[i];
}
return s === word;
}
// compare from end to end (more efficient)
@VasilSlavchev
VasilSlavchev / tic-tac-toe.html
Created March 2, 2017 13:00 — forked from bagaag/tic-tac-toe.html
Single File Tic Tac Toe against the Computer
<!DOCTYPE html>
<!--
Single file Tic Tac Toe against the Computer
https://gist.github.com/wiseley/9458565/
Author: Matt Wiseley
License: GPL - http://www.gnu.org/licenses/gpl.html
-->
<html>
<head>
<meta charset="UTF-8">