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
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
/etc/php5/fpm/php-fpm.conf | |
error_log = syslog | |
syslog.ident = php-fpm | |
This will log to syslog PHP-FPM stuff that usually gets logged to /var/log/php5-fpm.log and is not that interesting: | |
... php-fpm[3537]: [NOTICE] fpm is running, pid 3537 | |
... php-fpm[3537]: [NOTICE] ready to handle connections | |
... php-fpm[3537]: [NOTICE] Finishing ... |
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
cat exmaple.com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt > example.com.crt | |
If some browsers are complaining add "AddTrustExternalCARoot.crt" to the chain: | |
cat exmaple.com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > example.com.crt |
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
server { | |
listen 80 default; | |
server_name stats.example.com; | |
return 301 https://stats.example.com$request_uri; | |
} | |
upstream php-fpm { | |
server unix:/var/run/php5-fpm.sock; |
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; | |
} |
NewerOlder