Skip to content

Instantly share code, notes, and snippets.

@ivansostarko
ivansostarko / curl_rest_api_testing.txt
Last active May 29, 2017 13:44
Testing Rest API using cURL
#!/bin/bash
# API description
echo "Started TIME:"
dt=$(date '+%d/%m/%Y %H:%M:%S');
echo "$dt"
for i in {1..1000000}
do
echo "Executed times: $i"
curl -H "X-Authorization: api-key" --data "param_1=one&param_2=2" https://api.com/v1
@ivansostarko
ivansostarko / curl_rest_api_logging.txt
Created May 30, 2017 10:21
Logging Rest API using cURL
#!/bin/bash
# API log description
echo "Started TIME: $(date '+%d/%m/%Y %H:%M:%S')" > api.log
for i in {1..1000000}
do
echo "
Executed times: $i
str: $(date '+%d/%m/%Y %H:%M:%S.%N')" >> api.log;
curl -H "X-Authorization: api-key" --data "param_1=one&param_2=2" https://api.com/v1 >> api.log;
<?php
namespace App\Helpers;
/**
* Class ModulesMenu
*
* Render Menu for blade template
*
* @package App\Helpers
@ivansostarko
ivansostarko / terraform_digital_ocean_config.tf
Created September 10, 2017 19:59
Terraform - Digital Ocean Configuration
############### CONFIG ###################################
provider "digitalocean" {
token = "YOUR-TOKEN-HERE"
}
############### VMs ###################################
resource "digitalocean_droplet" "web" {
image = "centos-7-x64"
name = "webserver-1"
region = "fra1"
@ivansostarko
ivansostarko / devops_stacks.txt
Last active May 22, 2018 21:58
DevOps Stack
Programming languages
- PHP
- NodeJS
- Angular4
- GO
Source repositority
- Bitbucket
- Github
- GitLab
@ivansostarko
ivansostarko / NodeJS NPMs
Last active February 2, 2018 11:11
NodeJS NPMs
Web frameworks
- Express (http://expressjs.com/)
Drivers
- MySQL Driver (https://github.com/mysqljs/mysql)
- Cassandra Driver (https://github.com/datastax/nodejs-driver)
- Beanstalkd Drive (https://github.com/ceejbot/fivebeans)
- Redis Driver (https://github.com/NodeRedis/node_redis)
- Elastic search (https://github.com/elastic/elasticsearch-js)
- Vault (https://www.npmjs.com/package/node-vault)