sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Download zsh-autosuggestions by
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
/** | |
* return the distance between two points. | |
* | |
* @param {number} x1 x position of first point | |
* @param {number} y1 y position of first point | |
* @param {number} x2 x position of second point | |
* @param {number} y2 y position of second point | |
* @return {number} distance between given points | |
*/ | |
Math.getDistance = function( x1, y1, x2, y2 ) { |
$("#selectBox").append('<option value="option6">option6</option>'); |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
<?php | |
require_once "vendor/autoload.php"; | |
use Symfony\Component\Console\Application; | |
use Illuminate\Database\Console\Migrations; | |
use Pimple\Container; | |
$container = new Container(); | |
$container['migration-table'] = 'migration'; |
<?php | |
if(!function_exists('config_path')) | |
{ | |
/** | |
* Return the path to config files | |
* @param null $path | |
* @return string | |
*/ | |
function config_path($path=null) |
<?php | |
if (! function_exists('dbd')) { | |
/** | |
* Showing all database queries. | |
* Отображение всех запросов в базу. | |
* | |
* @param null|\Illuminate\Console\Command|\Psr\Log\LoggerInterface $channel | |
*/ | |
function dbd($channel = null) |
function calculate_age($birthday) { | |
$birthday_timestamp = strtotime($birthday); | |
$age = date('Y') - date('Y', $birthday_timestamp); | |
if (date('md', $birthday_timestamp) > date('md')) { | |
$age--; | |
} | |
return $age; | |
} | |
//вызов функции |