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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
const DELTA = 0.00000001 |
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
## Block spammy referrals | |
RewriteCond %{HTTP_REFERER} годом\.рф [NC] | |
RewriteCond %{HTTP_REFERER} traffic2cash\.xyz [NC] | |
RewriteCond %{HTTP_REFERER} free-traffic\.xyz [NC] | |
RewriteCond %{HTTP_REFERER} share-buttons\.xyz [NC] | |
RewriteCond %{HTTP_REFERER} maps\.ilovevitaly\.com [NC] | |
RewriteRule .* - [F] |
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
/******************************************************************************* | |
* Description: | |
* | |
* Gulp file to push changes to remote servers (eg: staging/production) | |
* | |
* Usage: | |
* | |
* gulp deploy --target | |
* | |
* Examples: |
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
/* | |
$screen-xs: 480px !default; // Extra small screen / phone | |
$screen-sm: 768px !default; // Small screen / tablet | |
$screen-md: 992px !default; // Medium screen / desktop | |
$screen-lg: 1200px !default; // Large screen / wide desktop | |
*/ |
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 | |
// Usage | |
$occurrences = next_occurrence('Friday', 13); | |
foreach($occurrences as $day) { | |
echo $day->format('D M j, Y') . PHP_EOL; | |
} | |
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 ruby | |
# | |
# metrics-curl | |
# | |
# DESCRIPTION: | |
# Simple wrapper around curl for getting timing stats from the various phases | |
# of connecting to an HTTP/HTTPS server. | |
# | |
# OUTPUT: | |
# metric data |
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
{ | |
"checks": { | |
"mysql": { | |
"command": "/usr/local/bin/check-mysql-alive.rb --host :::mysql.host::: --user :::mysql.user::: --password :::mysql.password::: --database :::mysql.database:::", | |
"interval": 60, | |
"occurrences": 1, | |
"refresh": 900, | |
"subscribers": [ | |
"mysql" | |
], |
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
{ | |
"checks": { | |
"http": { | |
"command": "/usr/local/bin/check-http.rb --url ':::http.url:::' --query ':::http.query:::' --timeout :::http.timeout|5:::", | |
"interval": 60, | |
"occurrences": 1, | |
"subscribers": [ | |
"http" | |
], | |
"handlers": [ "default", "mailer", "slack"] |
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
{ | |
"checks": { | |
"cpu": { | |
"command": "/usr/local/bin/check-cpu.rb -w :::system.cpu_warning|85::: -c :::system.cpu_critical|90:::", | |
"interval": 15, | |
"occurences": 4, | |
"subscribers": [ | |
"cpu" | |
] | |
} |
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
{ | |
"checks": { | |
"disk": { | |
"command": "/usr/local/bin/check-disk-usage.rb -w 85 -c 90", | |
"interval": 300, | |
"subscribers": [ | |
"linux" | |
] | |
} | |
} |
NewerOlder