This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Cinema\Cast; | |
/** | |
* Family interface | |
* | |
* @author Raphael Landas | |
* @package MyApp | |
* @copyright 2018 EthicalJobs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class Html | |
{ | |
static public function removeComments($content = '') | |
{ | |
return preg_replace('/<!--(.|\s)*?-->/', '', $content); | |
} | |
static public function sanitize($content) | |
{ | |
$search = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find the last commit that affected the given path. As the file isn't in the HEAD commit, this commit must have deleted it. | |
git rev-list -n 1 HEAD -- <file_path> | |
# Then checkout the version at the commit before, using the caret (^) symbol: | |
git checkout <deleting_commit>^ -- <file_path> | |
# Or in one command, if $file is the file in question. | |
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rev-parse --abbrev-ref HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git cherry-pick <commit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function testMe { | |
message=$1; | |
# check if there is an argument given | |
if [ "$1" != "" ]; then | |
echo -e "Test Me: $message\n"; | |
fi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(preg_match('/[^[:alpha:][:punct:][:digit:]]/u', utf8_encode($input)) { | |
// contains english and non-english characters | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only contains integers | |
if(ctype_digit((string) $string)){ | |
// only contains integers | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"require":{ | |
"wikimedia/composer-merge-plugin":"~1.0" | |
}, | |
"extra":{ | |
"merge-plugin":{ | |
"include":[ | |
"module/*/composer.json", | |
"module/*/*/composer.json" | |
], | |
"recurse":true, |
NewerOlder