Skip to content

Instantly share code, notes, and snippets.

Simon Müller boscho87

  • itsCoding
  • Switzerland
Block or report user

Report or block boscho87

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View translator.php
class XYTranslator implements TranslatorInterface
* @var User
protected $userMsgDomain;
* @var string
protected $systemMsgDomain;
while read oldrev newrev ref
if [[ $ref =~ .*/master$ ]];
echo "Master ref received. Deploying master branch to production..."
git --work-tree=/home/simonmul/www/ --git-dir=/home/simonmul/git/ checkout -f
echo "Ref $ref successfully received. Doing nothing: only the master branch may be deployed on this server."
boscho87 / ssmtp_mail_alias
Created Aug 13, 2018 — forked from SBejga/ssmtp_mail_alias
Bash Script as alias of "mail" using "ssmtp" in ubuntu. Main purpose is sending mails via munin by ssmtp instead of postfix.
View ssmtp_mail_alias
# mail syntax: mail -s "any mail subject string"
# or: mail "any mail subject string"
if [ $1 == "-s" ]
boscho87 / array_stuff.php
Last active Jun 13, 2018
Code for Thomas Chessa McSnake
View array_stuff.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;
boscho87 / comments.php
Created Jun 13, 2018
Example of bad comments
View comments.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
View LockableTraitCommandError.php
class TaskRunnerCommand extends ContainerAwareCommand
use FlockTrait;
const UUID = 'uuid';
protected function configure()
boscho87 / AppDebugEnvvarCommand.php
Created Apr 24, 2018
Command to Debug parsed env vars
View AppDebugEnvvarCommand.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;
View index.html
<!DOCTYPE html>
<html lang="de">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
You can’t perform that action at this time.