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
| #!/usr/bin/env bash | |
| function get_headphones_index() { | |
| echo $(pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}') | |
| } | |
| function get_headphones_mac_address() { | |
| local temp=$(pacmd list-cards | grep bluez_card -C20 | grep 'device.string' | cut -d' ' -f 3) | |
| temp="${temp%\"}" | |
| temp="${temp#\"}" |
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/sh | |
| # Installation | |
| # - Move this to /etc/init.d/myservice | |
| # - chmod +x this | |
| # | |
| # Starting and stopping | |
| # - Start: `service myservice start` or `/etc/init.d/myservice start` | |
| # - Stop: `service myservice stop` or `/etc/init.d/myservice stop` |
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
| # Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). | |
| # Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and | |
| # run `sudo service procps start` or reboot. | |
| # Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit | |
| # | |
| # More information resources: | |
| # -$ man inotify # manpage | |
| # -$ man sysctl.conf # manpage | |
| # -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use |
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 Acme\HotsiteBundle\EventListener; | |
| use Acme\HotsiteBundle\Controller\HotsiteSignedController; | |
| use Symfony\Component\HttpKernel\Event\FilterControllerEvent; | |
| use Symfony\Component\HttpFoundation\Session\Session; | |
| use Symfony\Component\HttpFoundation\RedirectResponse; |
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
| # Клонируем исходный репозиторий без рабочего каталога (--bare) | |
| git clone --bare https://github.com/exampleuser/old-repository.git | |
| cd old-repository.git | |
| # Делаем mirror-push(будут скопированы все ветки и тэги) в новый репозиторий | |
| git push --mirror https://github.com/exampleuser/new-repository.git | |
| cd .. | |
| # Удаляем папку с репозиторием |
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 | |
| class DefaultController extends Controller | |
| { | |
| /** | |
| * Dashboard page. | |
| * @Permissions(perm="dashboard_view") | |
| * @Route("/", name="ITEDashboardBundle_index") | |
| * @Template() | |
| * @return array |
NewerOlder