Skip to content

Instantly share code, notes, and snippets.

@logikal
logikal / consul.json
Last active May 24, 2016 19:12
y u no statsd, consul?
{
"data_dir": "/var/lib/consul/",
"addresses": {
"rpc": "127.0.0.1"
},
"ports": {
"dns": 8600,
"http": 8500,
"rpc": 8400,
"serf_lan": 8301,
@@ -290,15 +290,7 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl, struct net_device
goto out_entries;
}
- if (tbl->entry_size)
- n = kzalloc(tbl->entry_size, GFP_ATOMIC);
- else {
- int sz = sizeof(*n) + tbl->key_len;
-
- sz = ALIGN(sz, NEIGH_PRIV_ALIGN);
// http://openenergymonitor.org/emon/node/1267
//inclue lcdLibrary
#include
//intialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
//set input pin
int sensorPin = A4;
@logikal
logikal / yum_logs.log
Created January 11, 2016 23:36
st2actionrunner not installing correctly
[root@default-centos-6-chef-11 bin]# yum info stactions
Loaded plugins: security, verify
Error: No matching Packages to list
[root@default-centos-6-chef-11 bin]# yum info st2actions
Loaded plugins: security, verify
Installed Packages
Name : st2actions
Arch : noarch
Version : 1.2.0
Release : 8
@logikal
logikal / answers.yaml
Last active January 8, 2016 00:25
Stackstorm answer file ssl_cert, ssl_key examples. Chef code assumes you have your preferred cert and key on disk somewhere already.
---
st2_ssl_cert: ! '-----BEGIN CERTIFICATE-----
LINE 1
LINE 2
LINE 3
LINE 4
@logikal
logikal / docker_dvm_etcd.sh
Created January 22, 2014 18:40
Why you use docker and dvm: setting up an etcd instance to mess around with.
> [bin] uname -a
Darwin log1kal 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
> [bin] docker run ubuntu cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"
> [bin] docker run -d -p 4001:4001 -p 7001:7001 coreos/etcd
Unable to find image 'coreos/etcd' (tag: latest) locally
Pulling repository coreos/etcd
@logikal
logikal / Berksfile
Created December 6, 2013 21:36
Couldn't find any good docs on Berkshelf3 and berks-api configs, so this is what I've figured out so far.
source "http://my.api-server.tld:26200"
cookbook "foo"
cookbook "bacon"
@logikal
logikal / ruel_stracktrace.log
Created December 28, 2015 22:05
Trying to add the rule from https://github.com/logikal/packtest/blob/master/rules/inception.yaml results in the following stacktrace. completely possible that things like 'route' are not configured correctly.
2015-12-28 13:49:37,796 ERROR [-] Failed registering rule from /opt/stackstorm/packs/packtest/rules/inception.yaml.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/st2common/bootstrap/rulesregistrar.py", line 110, in _register_rules_from_pack
rule_api.validate()
File "/usr/lib/python2.7/dist-packages/st2common/models/api/base.py", line 85, in validate
allow_default_none=True)
File "/usr/lib/python2.7/dist-packages/st2common/util/schema/__init__.py", line 223, in validate
jsonschema.validate(instance=instance, schema=schema, cls=cls, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/jsonschema/validators.py", line 478, in validate
@logikal
logikal / .vimrc
Created September 13, 2013 23:56
set nocompatible " be iMproved
set encoding=utf-8
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Let Vundle manage Vundle. Required!
Bundle 'gmarik/vundle'
#!/bin/sh
while true; do
if test -n "`tmux showb 2> /dev/null`"; then
tmux saveb -|pbcopy && tmux deleteb
fi
sleep 0.5
done