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
docker run -d \ | |
--name=deconz \ | |
--net=host \ | |
--restart=always \ | |
-v /etc/localtime:/etc/localtime:ro \ | |
-v /volume1/Media/Docker/deconz:/root/.local/share/dresden-elektronik/deCONZ \ | |
--device=/dev/ttyACM0 \ | |
-e DECONZ_DEVICE=/dev/ttyACM0 \ | |
marthoc/deconz | |
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
bundle install --path vendor/bundle | |
init with: | |
bundle exec cap install |
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 php | |
<?php | |
# Save this script somewhere and set you sendmail path in php.ini like this: | |
# sendmail_path = sudo -u <your_system_username> <path_to_script>/mail.php | |
# create a filename for the emlx file | |
list($ms, $time) = explode(' ', microtime()); | |
$filename = dirname(__FILE__).'/'.date('Y-m-d h.i.s,', $time).substr($ms,2,3).'.emlx'; | |
# write the email contents to the file |
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 | |
include_once('vendor/autoload.php'); | |
use Symfony\Component\HttpFoundation\Request; | |
$request = Request::createFromGlobals(); | |
// Ako imaš proxy ispred, ovdje podesi njegov/njegove IP adrese | |
// $request->setTrustedProxies(['127.0.0.1']); | |
$ip = $request->getClientIp(); |
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 | |
protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService() | |
{ | |
$this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \Doctrine\Common\Cache\ApcCache(); | |
$instance->setNamespace('sf2orm_default_32698a00875dac44b2e177de4a61e9b868a21112a04f360ad75713c94e99d59c'); | |
return $instance; | |
} |
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
This works when I run it manualy from the shell: | |
/bin/echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', '[email protected]', 'pass')" | /usr/bin/graphite-manage shell | |
This is what I tried to do in Ansible: | |
- name: test | |
command: > | |
/bin/echo "from django.contrib.auth.models import User; User.objects.create_superuser('{{graphite_admin_username}}', '{{graphite_admin_email}}', '{{graphite_admin_password}}')" | /usr/bin/graphite-manage shell |
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
apt-get purge apt-listchanges apt-utils aptitude aptitude-common aptitude-doc-en arping bc bind9-host ca-certificates cloud-init cloud-initramfs-growroot cloud-utils console-setup console-setup-linux debian-faq dh-python dictionaries-common discover discover-data distro-info distro-info-data dnsutils doc-debian docutils-common docutils-doc eject emacsen-common euca2ools fontconfig fontconfig-config fonts-dejavu-core ftp geoip-database groff-base hicolor-icon-theme iamerican ibritish ienglish-common info install-info installation-report isc-dhcp-client isc-dhcp-common iso-codes ispell laptop-detect libalgorithm-c3-perl libarchive-extract-perl libassuan0:amd64 libatk1.0-0:amd64 libatk1.0-data libauthen-sasl-perl libavahi-client3:amd64 libavahi-common-data:amd64 libavahi-common3:amd64 libboost-iostreams1.55.0:amd64 libbind9-90 python python-apt python-apt-common python-boto python-cffi python-chardet python-cheetah python-configobj python-crypto python-cryptography python-debian python-debianbts python-def |
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
# http block | |
geoip_city /usr/local/share/GeoIP/GeoIPCity.dat; | |
geoip_country /usr/local/share/GeoIP/GeoIPCountry.dat; | |
# location block | |
proxy_set_header GEOIP_COUNTRY_CODE $geoip_country_code; | |
proxy_set_header GEOIP_COUNTRY_CODE3 $geoip_country_code3; | |
proxy_set_header GEOIP_COUNTRY_NAME $geoip_country_name; |
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/php | |
<?php | |
$slack_botname = "Icinga"; | |
$slack_webhook_url = "https://WEB-HOOK-URL"; | |
$icinga_hostname = "http://IP-OR-HOSTNAME-OF-YOUR-ICINGA-INSTALLATION"; | |
$type = $argv[1]; | |
$state = ("host" === $type) ? getenv('ICINGA_HOSTSTATE') : getenv('ICINGA_SERVICESTATE'); |
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
If you get this error during boot: | |
"AdditionsVBoxService error: VbglR3Init failed with rc=VERR_FILE_NOT_FOUND" | |
apt-get install linux-headers-`uname -r` | |
Reboot and reinstall virtualbox-guest-utils if needed. |
NewerOlder