Skip to content

Instantly share code, notes, and snippets.

@sitkevij
sitkevij / install-chef-client.sh
Last active August 29, 2015 14:04
install chef client
curl -L https://www.opscode.com/chef/install.sh | sudo bash
echo 'export PATH="/opt/chef/embedded/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile
sudo chef-server-ctl reconfigure
@sitkevij
sitkevij / install-chef-server.sh
Last active August 29, 2015 14:04
install-chef-server.sh
# test installed on ubuntu 14
# curl -L https://thisscript/install.sh | sudo bash
# curl -L https://gist.githubusercontent.com/sitkevij/3379c08292b34770e5cd/raw/16d2faae9c16556b1ad0bca075a2b51f960353e4/install-chef-server.sh | sudo bash
wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.1.3-1_amd64.deb
sudo dpkg -i chef-server_11.1.3-1_amd64.deb
sudo chef-server-ctl reconfigure
# read http://www.unixmen.com/install-configure-nagios-ubuntu-14-04-lts/
# echo $HISTFILE
# ls /home/ubuntu/.bash_history
# installation for fresh vm
sudo apt-get install nagios3 nagios-nrpe-plugin
sudo vim /etc/nagios3/nagios.cfg
#Find the line,
#
#check_external_commands=0
#And change it to:
@sitkevij
sitkevij / hex.sh
Created May 18, 2012 18:21
bash script to convert a string from hex to decimal
HEX=c9fc17d693b58ad31448d1177728964591ad1c720b545a05c700395c980a7029
i=1
while (( i <= ${#HEX} ))
do
char=$(expr substr "$HEX" $i 2)
# echo "<$char>"
printf "%d\n" 0x$char
(( i += 2 ))
done
@sitkevij
sitkevij / README-Template.md
Created October 27, 2017 17:26 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@sitkevij
sitkevij / fft.c
Created November 2, 2017 23:33
Fast Fourier transform (FFT) single file
#include <iostream>
#include <complex>
#define MAX 200
using namespace std;
#define M_PI 3.1415926535897932384
int log2(int N) /*function to calculate the log2(.) of int numbers*/
{
@sitkevij
sitkevij / fftifft.c
Last active November 2, 2017 23:47
Factored discrete Fourier transform, or FFT, and its inverse iFFT - http://www.math.wustl.edu/~victor/mfmm/fourier/
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define q 3 /* for 2^3 points */
#define N (1<<q) /* N-point FFT, iFFT */
typedef float real;
typedef struct{
@sitkevij
sitkevij / FaaS-serverless-technologies.md
Last active January 2, 2018 19:00
Function as a Service (Faas) Serverless Technologies