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
// based on schema.org basic recipe and nutrition definition. | |
// see jsonld example here: https://gist.github.com/patrickcoombe/48d4ad1eca1b22f6c5ae | |
// see schema markup example here: https://gist.github.com/jessotron/28f3b87d50ecb1c6aad2 | |
// for nutrition, see: https://www.fda.gov/Food/GuidanceRegulation/GuidanceDocumentsRegulatoryInformation/LabelingNutrition/ucm385663.htm | |
// vitamin dv: https://www.fda.gov/Food/GuidanceRegulation/GuidanceDocumentsRegulatoryInformation/ucm535371.htm | |
// formula for daily value percentage is: (nutrition / recommended_dv) * 100 = dv_percentage | |
// reverse formula: (dv_percentage / 100) * recommended_dv = nutrition | |
export default { | |
name: 'recipe', |
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/bash | |
echo 'checking for patch' | |
if ! grep -q "\/private\/ngin" /usr/local/vesta/data/templates/web/nginx/php-fpm/*.tpl; then | |
echo 'patch does not exists, applyiing patch...' | |
sed -ie "s/ location \/ {/ location \/ {\n include \%home\%\/\%user\%\/web\/\%domain\%\/private\/ngin*.conf;\n/g" /usr/local/vesta/data/templates/web/nginx/php-fpm/*.tpl | |
sed -ie "s/ location \/ {/ location \/ {\n include \%home\%\/\%user\%\/web\/\%domain\%\/private\/sngin*.conf;\n/g" /usr/local/vesta/data/templates/web/nginx/php-fpm/*.stpl | |
else | |
echo 'patch exists, exiting...' | |
fi |
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 | |
# re-enable phpmyadmin and phppgadmin | |
# rsync -a /etc/apache2/conf-d/php*.conf /etc/apache2/conf.d | |
# required startup and of course vesta | |
cd /etc/init.d/ | |
./disable-transparent-hugepages defaults | |
# the 5 services below are enabled to support mininum default backup job |
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
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection | |
$SqlConnection.ConnectionString = "Data Source=mssqlprod01;Initial Catalog=master;User Id=youruser;Password=yourpassword" | |
$SqlCmd = New-Object System.Data.SqlClient.SqlCommand | |
$SqlCmd.CommandText = 'SELECT @@SERVERNAME AS ServerName' | |
$SqlCmd.Connection = $SqlConnection | |
$SqlConnection.Open() | |
$rdr = $SqlCmd.ExecuteReader() | |
while($rdr.Read()) | |
{ | |
$rdr["ServerName"].ToString() |
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
<div class="wrap"> | |
<link href="//cdn.brickinc.net/asset/common/styles/print.css?nocache=89" rel="stylesheet" type="text/css" media="print"> | |
<div class="layout-container" data-ng-include="'//clientapi.brickinc.net/api/v1/content/meta/401/?name=home page&meta=template&type=text/html&nocache=89'"></div> | |
<!-- above the fold scripts --> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.29/angular.min.js"></script> | |
<script src="//clientapi.brickinc.net/api/v1/store/sitecontentscript/401?nocache=89"></script> |
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
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ | |
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ | |
RewriteCond %{REQUEST_URI} !^/\.well-known/ | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NC] |
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
var crypto = require('crypto'); | |
function getAuth() { | |
var secureKey = 'yourkey'; | |
var yourData = 'hmac'; | |
var yourTtl = 3600; // in seconds | |
var timeInSeconds = Math.floor(today.getTime() / 1000); | |
var stringToSign = `${timeInSeconds}:${yourTtl}:${yourData}`; | |
var shahmac = crypto.createHmac('SHA256', secureKey); |
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
# BEGIN Concrete5 rewrite | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^/c5/ | |
# exclude other sub-directories if necessary | |
RewriteCond %{REQUEST_URI} !^/dev/ | |
RewriteCond %{REQUEST_URI} !^/dev2/ |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_URI} !^/c5/ | |
# exclude other sub-directories if necessary | |
RewriteCond %{REQUEST_URI} !^/dev | |
RewriteCond %{REQUEST_URI} !^/dev2 |
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
proxy_cache_path /tmp/nginx/cache levels=1:2 keys_zone=cdn_diskcached:10m max_size=5g inactive=45m; | |
server { | |
listen 81; | |
listen [::]:81 ipv6only=on; | |
resolver 8.8.8.8 8.8.4.4; | |
merge_slashes off; |