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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon |
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 is a simple way to redirect based on screen size. This redirect would go at the bottom of your template for the landing page. | |
<br /> | |
<script>// <![CDATA[<br /> | |
if (screen.width <= 800) {<br /> | |
document.location = "http://subdomain.domain.com";<br /> | |
}<br /> | |
// ]]></script><br /> | |
OR |
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
#RewriteCond %{HTTP_HOST} !^www\. | |
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [R=301,L] | |
# | |
## rewrite non www -> www | |
# | |
server { | |
listen 80; | |
server_name domain.com; |
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; | |
server_name domain.com; | |
rewrite ^(.*)$ $scheme://www.domain.com$1; | |
} | |
server { | |
listen 80 default_server; |
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; | |
server_name domain.com; | |
rewrite ^(.*)$ $scheme://www.domain.com$1; | |
} | |
server { | |
listen 80 default_server; |
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
[Definition] | |
actioncheck= | |
actionstart = | |
actionstop = | |
actionban = /bin/bash /etc/fail2ban/slack_notify.sh "Banned _country_ <ip> in the jail <name> after <failures> attempts" "<ip>" > /dev/null 2>&1 | |
actionunban = /bin/bash /etc/fail2ban/slack_notify.sh "Unbanned _country_ <ip> in the jail <name>" "<ip>" > /dev/null 2>&1 |
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
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
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
1 x ASRock Z68 PROFESSIONAL GEN3 LGA 1155 Intel Z68 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard | |
1 x Crucial M4 CT128M4SSD2 2.5" 128GB SATA III MLC Internal Solid State Drive (SSD) | |
1 x Intel Core i7-2600K Sandy Bridge 3.4GHz (3.8GHz Turbo Boost) LGA 1155 95W Quad-Core Desktop Processor BX80623I72600K | |
1 x G.SKILL Ripjaws Series 16GB (4 x 4GB) 240-Pin DDR3 SDRAM DDR3 1600 (PC3 12800) Desktop Memory Model F3-12800CL9Q-16GBRL | |
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) |
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
SELECT p.name as procedure_name, addr.zip as zip, | |
s.procedure_id as proc, s.id | |
FROM slots AS s, procedures AS p, organizations AS o, addresses_organizations as au, addresses as addr | |
WHERE s.provider_id = o.id | |
AND s.procedure_id = p.id | |
AND au.organization_id = o.id | |
AND addr.id = au.address_id | |
AND addr.zip LIKE '".$zipcode."%' | |
ORDER BY random() | |
LIMIT 5 |
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] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; This file controls many aspects of PHP's behavior. In order for PHP to | |
; read it, it must be named 'php.ini'. PHP looks for it in the current | |
; working directory, in the path designated by the environment variable | |
; PHPRC, and in the path that was defined in compile time (in that order). | |
; Under Windows, the compile-time path is the Windows directory. The |
NewerOlder