Skip to content

Instantly share code, notes, and snippets.

View jippi's full-sized avatar

Christian Winther jippi

View GitHub Profile
<?php
namespace Bownty\Foundation\Error;
use Bownty\Foundation\Environment;
use Cake\Console\ConsoleErrorHandler;
use Exception;
use NewRelic\Lib\NewRelic;
/**
* Error Handler for Cake console. Does simple printing of the
* exception that occurred and the stack trace of the error.
*/
@jippi
jippi / nr.php
Last active February 20, 2017 15:27
<?php
newrelic_add_custom_parameter('APP_VERSION', Environment::getAppVersion());
newrelic_add_custom_parameter('APP_ENV', Environment::get());
if (php_sapi_name() !== 'cli') {
newrelic_add_custom_parameter('_get', json_encode($_GET));
newrelic_add_custom_parameter('_post', json_encode($_POST));
newrelic_add_custom_parameter('_files', json_encode($_FILES));
newrelic_add_custom_parameter('_cookies', json_encode($_COOKIE));
$serverVars = [
'GEOIP_COUNTRY_CODE', 'GEOIP_CITY_NAME', 'HTTP_HOST',
// Scale for the job "content-themes"
job "content-themes" {
// For group "populator"
group "populator" {
// (required) The minimum nuber of tasks to run for this job
min_count = 0
// (required) The maximum number of tasks to run for this job
max_count = 1
scale "bump" {
name = "hello"
type = "rabbitmq"
}
scale "derp" {
name = "world"
type = "derp"
}
job "nomad-ui" {
type = "system"
region = "global"
datacenters = ["production", "stage"]
constraint {
attribute = "${meta.web}"
value = "1"
}
module Main exposing (..)
import Allocation.List
import Allocation.View
import Array exposing (Array)
import Date exposing (Date)
import Html exposing (..)
import Html.Attributes exposing (..)
import Job.List
import Material
type Route = ViewAllocationRoute2 String String
currentRoute = ViewAllocationRoute2 "a" "b"
firstVar secondVar = currentRoute
_ = Debug.log "firstVar" (toString firstVar)
_ = Debug.log "firstVar" (toString <| firstVar)
@jippi
jippi / job.hcl
Created November 24, 2016 12:26
job "elasticsearch-email-logs" {
datacenters = ["production"]
update {
stagger = "120s"
max_parallel = 1
}
constraint {
attribute = "${node.class}"
-- TYPE MISMATCH -------------------------------------------------- src/Main.elm
The 7th and 8th entries in this list are different types of values.
45| [ Url.map ListAllocationsRoute Url.top
46| , Url.map ListAllocationsRoute (Url.s "allocations")
47| , Url.map ViewAllocationRoute (Url.s "allocations" </> Url.string)
48| , Url.map ViewAllocationRoute (Url.s "allocations" </> Url.string </> Url.s "info")
49| , Url.map ViewAllocationRoute (Url.s "allocations" </> Url.string </> Url.s "files")
50| , Url.map ViewAllocationRoute (Url.s "allocations" </> Url.string </> Url.s "logs")
[
{
"Addr": "xxx.xxx.35.151",
"DelegateCur": 4,
"DelegateMax": 4,
"DelegateMin": 2,
"Name": "consul01.global",
"Port": 4648,
"ProtocolCur": 2,
"ProtocolMax": 4,