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
sysctl -w vm.min_free_kbytes=16000 | |
sysctl -w vm.overcommit_memory=2 | |
sysctl -w vm.overcommit_ratio=100 | |
sysctl -w vm.panic_on_oom=1 | |
sysctl -w kernel.panic_on_oops=1 | |
sysctl -w kernel.panic=10 |
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
Setting the "X-EventQL-Namespace" header will specify the database for which the operation should | |
be executed. | |
For example if you want to use the database "test", set this header: | |
curl ... -H "X-EventQL-Namespace: test" |
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
cmake_minimum_required(VERSION 2.6) | |
project(blahblah) | |
set(PROJ_SOURCES | |
src/a.cc | |
src/b.cc) | |
if(APPLE) | |
set(CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}") | |
else() |
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 | |
require "socket" | |
udp = UDPSocket.new | |
udp.bind('0.0.0.0', 8125) | |
targets = [ | |
["localhost", 8125], | |
["other.host.net", 8125] | |
] |
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 file is part of the "plgl" project | |
* (c) 2014 Paul Asmuth <[email protected]> | |
* | |
* All rights reserved. Please contact me to obtain a license. | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include <plgl/engine.h> |
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
; compile & run on OSX | |
; $ nasm -f macho -o /tmp/fnord.o fnord.asm | |
; $ ld -o /tmp/fnord /tmp/fnord.o | |
; $ /tmp/fnord | |
section .data | |
section .text | |
global start | |
start: |
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 file is part of the "LoveOS" project | |
// (c) 2013 DaWanda GmbH, Paul Asmuth <[email protected]>, et al. | |
// All rights reserved. | |
#include "plv.h" | |
#include "ruby.h" | |
VALUE loveos_render = Qnil; | |
// glue code to call the plv_load_json + plv_render methods from ruby |
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
// FnordMetric Enterprise | |
// (c) 2011-2013 Paul Asmuth <[email protected]> | |
// | |
// Licensed under the MIT License (the "License"); you may not use this | |
// file except in compliance with the License. You may obtain a copy of | |
// the License at: http://opensource.org/licenses/MIT | |
package com.fnordmetric.enterprise | |
import scala.collection.mutable.ListBuffer |
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
#!/bin/bash | |
# This scripts sends a JSON message containing system health | |
# information to a fyrehose channel. | |
# | |
# Usage: | |
# $ ./linux_health_monitor.sh [host] [port] [channel] | |
# e.g. | |
# $ ./linux_health_monitor.sh localhost 2323 my_channel | |
# |
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 com.dawanda.recommender | |
import scala.collection.JavaConverters._ | |
import scala.collection.mutable.Buffer | |
import scala.io._ | |
import java.util.concurrent._ | |
class CSVReader[T <: Any](next: (Map[Symbol, Int] => T)){ | |
def read(file_path: String) : Buffer[T] = { |
NewerOlder