Skip to content

Instantly share code, notes, and snippets.

View VasilSlavchev's full-sized avatar

Vasil Slavchev VasilSlavchev

View GitHub Profile
@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">
@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 / 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 / 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 / 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 / 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 / get_favicon.md
Created October 16, 2019 12:48 — forked from ozh/get_favicon.md
Most standard ways to get a favicon from a page

Most standard ways to get a favicon from a page, in preferred order

In file:

  • <link href="http://someserver/favicon.ico" rel="shortcut icon" />
  • <link href="http://someserver/favicon.ico" rel="shortcut" />
  • <link href="http://someserver/favicon.ico" rel="icon" />
  • <link href="http://someserver/favicon.png" rel="apple-touch-icon" />
  • <link href="http://someserver/favicon.png" rel="apple-touch-icon-precomposed" />
  • <link href="http://someserver/favicon.ico" rel="image_src" />
@VasilSlavchev
VasilSlavchev / LICENCE SUBLIME TEXT
Created October 31, 2019 15:36
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,