Skip to content

Instantly share code, notes, and snippets.

View Daniil-Solovyev's full-sized avatar
🏝️
Web developer from Russia

Даниил Daniil-Solovyev

🏝️
Web developer from Russia
View GitHub Profile
@Daniil-Solovyev
Daniil-Solovyev / spaces.php
Created June 30, 2021 09:30
Удаление лишних пробелов
<?php
$input = ' On my home world';
/**
* @param string $input
* @param $separator
* @return string
*/
function emptySpaces(string $input, $separator): string
@Daniil-Solovyev
Daniil-Solovyev / git.migrate
Created April 15, 2021 08:37 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@Daniil-Solovyev
Daniil-Solovyev / Youtube iframe
Last active June 24, 2019 18:56
Youtube iframe in bootstrap modal
<object width="640" height="360">
<param name="movie" value="http://www.youtube.com/embed/<?= $model->link ?>?html5=1&amp;rel=0&amp;hl=en_US&amp;version=3"/>
<param name="allowFullScreen" value="true"/>
<param name="allowscriptaccess" value="always"/>
<embed width="640" height="360" src="http://www.youtube.com/embed/<?= $model->link ?>?html5=1&amp;rel=0&amp;hl=en_US&amp;version=3" class="youtube-player" type="text/html" allowscriptaccess="always" allowfullscreen="true"/>
</object>