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
function prj --description "Project jumper" | |
if not command -q fzf | |
echo >&2 "prj: fzf command not found. Install with your OS package manager." | |
return 1 | |
end | |
# determine the project home | |
set -q MY_PROJECTS || set -l MY_PROJECTS ~/projects | |
set -l prjfolders (find $MY_PROJECTS -maxdepth 2 -type d -iname ".git" -printf "%h\n") |
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
#!/usr/bin/env bash | |
set -o nounset | |
set -o errexit | |
[[ "$EUID" -eq 0 ]] || exec sudo /bin/bash -c "$(printf '%q ' "$BASH_SOURCE" "$@")" | |
declare -A source=( [0x0f]="DP" [0x11]="HDMI" ) | |
declare -A inputMap=( [0x0f]=0x11 [0x11]=0x0f ) |
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
[Unit] | |
Description=X Virtual Frame Buffer Service | |
After=network.target | |
[Service] | |
ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24 | |
[Install] | |
WantedBy=multi-user.target |
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 | |
use Symfony\Component\PropertyAccess\PropertyAccess; | |
use Symfony\Component\Validator\Constraints\All; | |
use Symfony\Component\Validator\Constraints\Choice; | |
use Symfony\Component\Validator\Constraints\Collection; | |
use Symfony\Component\Validator\Constraints\Length; | |
use Symfony\Component\Validator\Constraints\NotBlank; | |
use Symfony\Component\Validator\Constraints\Optional; | |
use Symfony\Component\Validator\Constraints\Required; |
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 My\Namespace; | |
/** | |
* This Listener listens to the loadClassMetadata event. Upon this event | |
* it hooks into Doctrine to update discriminator maps. Adding entries | |
* to the discriminator map at parent level is just not nice. We turn this | |
* around with this mechanism. In the subclass you will be able to give an | |
* entry for the discriminator map. In this listener we will retrieve the | |
* load metadata event to update the parent with a good discriminator map, |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
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 | |
// src/Acme/DemoBundle/Form/ExampleType.php | |
namespace Acme\DemoBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Acme\DemoBundle\Form\Type\FieldsetType; | |
class ExampleType extends AbstractType { |
NewerOlder