Skip to content

Instantly share code, notes, and snippets.

Karel Wintersky KarelWintersky

  • St.Peterburg
Block or report user

Report or block KarelWintersky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View DBPool.class.php
/**
* Class DBPool
* DBCAlias is alias for karelwintersky/arris -> DB wrapper over PDO.
* equal to PDO-connection
*/
class DBPool {
private $pool_max_size = 0;
private $pool = [];
private $db_table = '';
@KarelWintersky
KarelWintersky / meta-tags.md
Created Mar 19, 2019 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
View gist:620390b5c1a83893d4e525c112b6e595
#!/bin/bash
#
# # # # # # # # # # НАСТРОЙКИ ДОСТУПА К MYSQL # # # # # # # # # #
MYSQL_SERVER=localhost
MYSQL_USER=root
MYSQL_PASSWORD=password
MYSQL_DATABASES="--all-databases"
# Yandex.Disk настройки (как получить - см. https://oauth.yandex.ru/ и https://oauth.yandex.ru/authorize?response_type=token&client_id=?)
@KarelWintersky
KarelWintersky / mysql_dbu_create.sh
Created Oct 9, 2018
Script to create MySQL db + user
View mysql_dbu_create.sh
#!/usr/bin/env bash
#
# Script to create MySQL db + user
#
# @author Karel Wintersky <karel.wintersky@gmail.com>
# @version 0.2
# mysql_config_editor set --login-path=proftpd --host=localhost --user=proftpd --password
View gist:a9b3c0813adebf95fd050505df64c987

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@KarelWintersky
KarelWintersky / standalone_counter.php
Created Jan 10, 2018
Standalone simple hit counter
View standalone_counter.php
<?php
// вызывается как standalone_counter.php?id=N
// по умолчанию (если id опущен) - принимается равным 1
function getRealIP() {
$ip = '127.0.0.1';
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
View two middleware calls.md

routes/web.php

use App\Http\Middleware\CheckAge;

Route::get('users/{id}', function($id) {

})->middleware(CheckAge::class);
@KarelWintersky
KarelWintersky / bootstrap-vertical-grid.css
Created Sep 28, 2017 — forked from cmcraducu/bootstrap-vertical-grid.css
Bootstrap vertical grid. For laying out full-screen fixed height webapps.
View bootstrap-vertical-grid.css
.container-fixed {
bottom: 0;
position: fixed;
left: 0;
right: 0;
top: 0;
}
.container-fixed .col {
height: 100%;
@KarelWintersky
KarelWintersky / hash.php
Created Sep 26, 2017
PHP HASH algorithms comparsion
View hash.php
<?php
/**
* User: Arris
* Date: 21.09.2017, time: 0:35
*/
const TEST_COUNT = 1000000;
const SOURCE = 'Тестируем построение хэша php с помощью стандартной библиотеки HASH::';
function TESTER( $testing_function, $argument )
{
@KarelWintersky
KarelWintersky / osslcrypt.php
Last active Sep 20, 2017
openssl_encrypt() cyphers testing comparsion
View osslcrypt.php
<?php
/**
* User: Arris
* Date: 21.09.2017, time: 0:35
*/
const TEST_COUNT = 100000;
const SOURCE = 'Тестируем обратимое шифрование на php';
const KEY = "password";
function TESTER( $testing_function, $argument )
You can’t perform that action at this time.