This file contains 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
https://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows |
This file contains 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
class XYTranslator implements TranslatorInterface | |
{ | |
/** | |
* @var User | |
*/ | |
protected $userMsgDomain; | |
/** | |
* @var string | |
*/ | |
protected $systemMsgDomain; |
This file contains 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 | |
while read oldrev newrev ref | |
do | |
if [[ $ref =~ .*/master$ ]]; | |
then | |
echo "Master ref received. Deploying master branch to production..." | |
git --work-tree=/home/simonmul/www/uhc-scorpions.ch --git-dir=/home/simonmul/git/uhc-scorpions.ch checkout -f | |
else | |
echo "Ref $ref successfully received. Doing nothing: only the master branch may be deployed on this server." | |
fi |
This file contains 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 | |
# mail syntax: mail -s "any mail subject string" any@mail.com | |
# or: mail "any mail subject string" any@mail.com | |
if [ $1 == "-s" ] | |
then | |
subject=$2 | |
recip=$3 | |
else | |
subject=$1 | |
recip=$2 |
This file contains 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 | |
$bucketOne = ['yellow', 'red', 'blue']; | |
$bucketTwo = ['yellow', 'yellow', 'red', 'blue', 'blue']; | |
//filter the second array so that there are only duplicated values in there | |
$values = array_filter(array_count_values($bucketTwo),function ($value) { | |
// > one means in the bucket it must appear at least 2 times, you can check for `$value == 2` if you only what elemnts that apprears twice and not more | |
if ($value > 1) { | |
return $value; | |
} |
This file contains 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 | |
/** example one (with to much comments) **/ | |
/** --- class code here ---- */ | |
/** | |
* if its not an admin user and the csrf token is okay and the | |
* current system is admin_system | |
**/ |
This file contains 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
class TaskRunnerCommand extends ContainerAwareCommand | |
{ | |
use FlockTrait; | |
const UUID = 'uuid'; | |
protected function configure() | |
{ | |
$this->setName('kub:task:runner') |
This file contains 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 App\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Style\SymfonyStyle; |
This file contains 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
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Titel</title> | |
</head> | |
<body> | |
</body> | |
</html> |