Skip to content

Instantly share code, notes, and snippets.

View IvanGavrikov's full-sized avatar

Ivan.Gavrikov IvanGavrikov

View GitHub Profile
@IvanGavrikov
IvanGavrikov / array_filter_key.php
Created December 11, 2019 18:48 — forked from h4cc/array_filter_key.php
Filtering a PHP array by key instead of value.
<?php
/**
* Filtering a array by its keys using a callback.
*
* @param $array array The array to filter
* @param $callback Callback The filter callback, that will get the key as first argument.
*
* @return array The remaining key => value combinations from $array.
*/
@IvanGavrikov
IvanGavrikov / Update remote repo
Created September 20, 2018 14:03 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket