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 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 / bench.php
Last active Jun 11, 2017 — forked from AgelxNash/bench.php
PHP Benchmark Performance Script v1.0.6
View bench.php
#!/usr/bin/php
<?php
/*
##########################################################################
# PHP Benchmark Performance Script #
# © 2010 Code24 BV #
# #
# Author : Alessandro Torrisi #
# Author : Sergey Dryabzhinsky #
# Company : Code24 BV, The Netherlands #
@KarelWintersky
KarelWintersky / mkstage4.sh
Created Jun 1, 2017
Backup script for Gentoo Linux
View mkstage4.sh
#!/bin/bash
# Backup script for Gentoo Linux
# Copyright Reto Glauser aka Blinkeye
# Distributed under the terms of the GNU General Public License v2
# Mailto: stage4 at blinkeye dot ch
# Forum post: http://forums.gentoo.org/viewtopic-t-312817.html
# Date: 2005-06-30
version=v3.5
basename=`basename $0`
@KarelWintersky
KarelWintersky / uri.js
Created Apr 2, 2017 — forked from jlong/uri.js
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@KarelWintersky
KarelWintersky / meta-tags.md
Last active Feb 24, 2017 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags
View meta-tags.md

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

Basic HTML Meta Tags

<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">
<meta name="language" content="ES">
View regular_expression_cheatsheet.md

Regular Expression Cheatsheet

Anchors

^   Matches at the start of string or start of line if multi-line mode is
	enabled. Many regex implementations have multi-line mode enabled by
	default.

$   Matches at the end of string or end of line if multi-line mode is enabled.
@KarelWintersky
KarelWintersky / television_resolution_standards.md
Created Dec 17, 2016 — forked from jonlabelle/television_resolution_standards.md
Digital and analog television standards resolution reference.
View television_resolution_standards.md

Television Standards

Digital and analog television standards resolution reference.

Digital TV Standards

Standard Resolution (dots × lines) DAR (H:V) Pixels
PixelVision 120 × 90 4:3 10,800
@KarelWintersky
KarelWintersky / csv2sql.php
Last active Aug 19, 2017
CSV to SQL converter (insert and update)
View csv2sql.php
<?php
/**
* (c) Karel Wintersky, 13 Sept. 2016
*/
$content = '';
if ($_POST["ref"] === "csv2sql") {
$table_name = $_POST["table_name"];
$csv_delimeter = @isset($_POST['DELIMETER']) ?: ',';
$csv_enclosure = @isset($_POST['ENCLOSURE']) ?: '"';
$csv_data = $_POST["csv_data"];
@KarelWintersky
KarelWintersky / csv2sql-insert.php
Last active Sep 13, 2016
CSV to SQL convertor (insert only).
View csv2sql-insert.php
<?php
$content = '';
if ($_POST["ref"] === "csv2sql") {
// prepare data
$table_name = $_POST["table_name"];
$csv_delimeter = @isset($_POST['DELIMETER']) ?: ',';
$csv_enclosure = @isset($_POST['ENCLOSURE']) ?: '"';
$csv_data = $_POST["csv_data"];
$csv_as_array = explode("\n", $csv_data);
@KarelWintersky
KarelWintersky / mysql.sh
Created Sep 6, 2016 — forked from valerio-bozzolan/mysql.sh
Debian GNU/Linux MySQL-MariaDB autologin
View mysql.sh
#!/bin/bash
########################################
# MySQL | MariaDB autologin
# License: GNU GPL v3+
# Author: Valerio Bozzolan
########################################
file=/etc/mysql/debian.cnf
while [ -z "$user" ] && read ln; do
You can’t perform that action at this time.