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 Kunstmaan\NodeSearchBundle\Configuration; | |
use Doctrine\ORM\EntityManager; | |
use Kunstmaan\AdminBundle\Helper\Security\Acl\Permission\MaskBuilder; | |
use Kunstmaan\NodeBundle\Entity\NodeVersion; | |
use Kunstmaan\NodeSearchBundle\Helper\IndexablePagePartsService; | |
use Kunstmaan\NodeSearchBundle\Helper\SearchBoostInterface; | |
use Kunstmaan\NodeSearchBundle\Helper\SearchViewTemplateInterface; |
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 Gedmo\References; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\Common\EventArgs; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use Gedmo\Mapping\MappedEventSubscriber; | |
/** |
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
<services> | |
<service id="my_mailer" class="Acme\HelloBundle\Mailer"> | |
<argument type="expression">service('mailer_configuration').getMailerMethod()</argument> | |
</service> | |
</services> |
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
check_errs() | |
{ | |
# Function. Parameter 1 is the return code | |
# Para. 2 is text to display on failure. | |
if [ "${1}" -ne "0" ]; then | |
echo "ERROR # ${1} : ${2}" | |
# as a bonus, make our script exit with the right error code. | |
exit ${1} | |
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
wde |
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
[ | |
{ | |
"id": "891dfee63bb6", | |
"name": "Op adem na borstkanker", | |
"type": "package", | |
"links": [ | |
{ | |
"rel": "self", | |
"href": "/api/treatment/891dfee63bb6" | |
}, |
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
Interface: | |
interface name + 'Interface' as suffix | |
Abstract class: | |
prefix with 'Abstract' + class name | |
Trait: | |
trait name + 'Trait' as suffix |
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
from microdetector import detect_mobile | |
@detect_mobile | |
def my_mobile_view(request): | |
if request.mobile: | |
#do something with mobile |
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/sh | |
cd /usr/share/locales | |
./install-language-pack eo.UTF-8 | |
./install-language-pack ia.UTF-8 | |
./install-language-pack ie.UTF-8 | |
./install-language-pack io.UTF-8 | |
./install-language-pack vo.UTF-8 | |
./install-language-pack ca.UTF-8 | |
./install-language-pack fr_AD.UTF-8 |
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
from string import digits, ascii_letters | |
from random import choice | |
from sys import argv | |
def generator(length): | |
chac = digits + ascii_letters | |
pwd = list() | |
for p in range(length): | |
pwd.append(choice(chac)) | |
print("".join(pwd)) |