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
# Simple example to deploy traefik with consul connect enabled. | |
# For simplicity the job includes traefik as well as the backend service. | |
# Please note that traefik currently only supports connect for HTTP. | |
job "traefik-consul-connect-demo" { | |
datacenters = ["dc1"] | |
group "edge" { | |
network { | |
mode = "bridge" |
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
#include <array> | |
#include <tuple> | |
constexpr std::array<char, 4> base64(uint8_t octet0, uint8_t octet1, uint8_t octet2) | |
{ | |
constexpr std::array<char, 64> table = { | |
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', | |
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', | |
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', | |
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', |
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
<?php | |
//disable execution time limit when downloading a big file. | |
set_time_limit(0); | |
/** @var \League\Flysystem\Filesystem $fs */ | |
$fs = Storage::disk('local')->getDriver(); | |
$fileName = 'bigfile'; | |
$metaData = $fs->getMetadata($fileName); |
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
/** | |
------------------------------------------------------------------------------------ | |
!!!!! This was moved to https://github.com/artivis/boost_serialization_helper !!!!! | |
------------------------------------------------------------------------------------ | |
*/ | |
#ifndef _BOOST_SERIALIZATION_EIGEN_ | |
#define _BOOST_SERIALIZATION_EIGEN_ | |
#include <Eigen/Sparse> |
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
// From http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/ | |
// Start with a temperature, in Kelvin, somewhere between 1000 and 40000. (Other values may work, | |
// but I can't make any promises about the quality of the algorithm's estimates above 40000 K.) | |
function colorTemperatureToRGB(kelvin){ | |
var temp = kelvin / 100; |
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
#include <cstdint> | |
namespace detail | |
{ | |
// FNV-1a 32bit hashing algorithm. | |
constexpr std::uint32_t fnv1a_32(char const* s, std::size_t count) | |
{ | |
return ((count ? fnv1a_32(s, count - 1) : 2166136261u) ^ s[count]) * 16777619u; | |
} | |
} // namespace detail |
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
<!-- app/etc/modules/Acme_Dynamic.xml --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<config> | |
<modules> | |
<Acme_Dynamic> | |
<codePool>local</codePool> | |
<active>true</active> | |
</Acme_Dynamic> | |
</modules> | |
</config> |