Category: Code

Elasticsearch controller

So we uses alot of easticsearch. And here is i small script to get status and do some simple task with es server. You can get cluster status and cron for index deletions.   import urllib2 # # # Clean up elastich search index by removing old stuff. #The defult ip to es server dhost=’′ #The index name you are… Read more →

Python DOS protection (iptables,dos)

here are a small script I use to have some sort of dos protection on my webservers.   import subprocess whitelist=[‘’] blockvalue=2 alertvalue=1 proc = subprocess.Popen(“netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n”, shell=True,stdout=subprocess.PIPE) running = runing_sorted = running.split(‘\n’) for r in runing_sorted: con =r.split() if len(con) ==2: #If… Read more →

Raspberry pi And Tellusd

Im using tellus to get info from my sensors like huminity and temp. And to get to work am using my rasp pi to recive and send siganls. Here is a quick guide to install and setup tellusd on you raspberry.   1. Verify that tellus is there pi@raspberrypi ~ $ lsusb Bus 001 Device 002: ID 0424:9512 Standard Microsystems… Read more →

Setup SPI on Raspberry pi (mcp3008, Adafruit)

Im building my own watering system and to that I will have some sensores.. They are connected to my pi over SFI and a mcp3008 from Adafruit.   The gear   Setup the cables Use this guide and se how the you should connect the mcp3008 and the sensore.   Get the Pi ready  … Read more →

Installing Go build server on centos 7

Installing the go build server in centos 7 with some easy step     1. First head over to the go page and have a look around 2. Download go server to you centos box   wget wget 3. Install it First start by adding the go user (something broken in install) useradd go Now run yum localinstall… Read more →

Getting django docker prod ready with jenkins (part 1 the build)

So i have some django webb projects and now its time to get my django apps prod ready with docker. My plan is to with jenkins build my django apps (soon start a docker of the app and run some test but that will be later) make a docker image and send that to the docker cloud. Then a can… Read more →

vmware to kvm (OWASP broken webb app on KVM)

So I uses kvm for my virtual server. But i got OWASP broken webb app in vmware format and its not ok. But with the help from google i found some help to get the OWASP Broken Webb App on my kvm hosts. I follewed the info from this page     1. Download and unzip Owasp Broken… Read more →

OAuth2 Server on Python (with flask on Centos)

So at work we have started to look at OAuth2 for our web apps. So on our creativ friday today i started looking at putting together an OAuth2 server using python and flask. I followed the guide from this page And after some work I got an working server and client running on my Centos server. The code only uses… Read more →

Starting with Go on Ubuntu

So I starting to test to use the go language for some projects. Here is how i set up go on my ubuntu laptop.   1. Installing go language sudo apt-get install python-software-properties sudo add-apt-repository ppa:duh/golang sudo apt-get update sudo apt-get install golang verify go version 2. Getting an good IDE I uses sublime text find if here and install… Read more →

Build you first syco Module

SO from the last post you can install syco but you also need to build and update your own plugins in syco. Here is a small guide how to build you first plugin. Here om building some syco commands for controlling apache and glassfish server. the commands are run from our syco-chuck release commands center so for adding them to… Read more →

%d bloggers like this: