Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Igor Ivanovic igorzg

🎯
Focusing
View GitHub Profile
@igorzg
igorzg / Microsoft.PowerShell_profile.ps1
Created Nov 18, 2021
Microsoft PowerShell profile
View Microsoft.PowerShell_profile.ps1
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@igorzg
igorzg / ohmyposh.json
Created Nov 18, 2021
Oh My Posh Theme
View ohmyposh.json
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
View typescript-project-dependencies.md
npm init
npm i --save-dev @types/node \
                 @types/jest \
                 @typescript-eslint/eslint-plugin \
                 @typescript-eslint/eslint-plugin-tslint \
                 @typescript-eslint/parser \
                 coveralls \
                 eslint \
                 jest \
@igorzg
igorzg / CMakeLists.txt
Last active Apr 16, 2018
NodeJS native Cmake config - MacOS
View CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(NodeProject)
set(CMAKE_CXX_STANDARD 17)
file(READ $ENV{HOME}/.nvm/alias/default NODE_VER)
string(STRIP ${NODE_VER} NODE_VER)
set(LIBUV_VER "1.20.0")
set(LIBUV_PATH "/usr/local/Cellar/libuv/${LIBUV_VER}")
@igorzg
igorzg / AWS-Lambda-To-ElasticBeanStalk-Deployment-CodePipeLine.js
Created Nov 20, 2017
CodePipeline AWS Lambda to ElasticBeanstalk deployment
View AWS-Lambda-To-ElasticBeanStalk-Deployment-CodePipeLine.js
"use strict";
const util = require('util');
const AWS = require("aws-sdk");
/**
* Deploy env
* @param event
* @param context
* @param callback
* Example of params
@igorzg
igorzg / async_resolution.java
Created Jun 18, 2017
Jaxrs async marshaling feature reqeust
View async_resolution.java
@Path("/{partner}/sync")
@Produces(MediaType.APPLICATION_JSON)
public class SyncResource {
@PathParam("partner") String partner;
@Inject SyncService syncService;
@igorzg
igorzg / dynamodb_dynamic_structure.java
Created Mar 24, 2017
Dynamodb dynamic low level api map converter
View dynamodb_dynamic_structure.java
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTypeConverter;
import com.amazonaws.services.dynamodbv2.document.internal.InternalUtils;
import com.amazonaws.services.dynamodbv2.model.AttributeValue;
import java.util.Map;
public class DynamicStructure implements DynamoDBTypeConverter<Map<String, AttributeValue>, Map<String, Object>> {
@Override
public Map<String, AttributeValue> convert(Map<String, Object> object) {
@igorzg
igorzg / dynamodb-json-mapper.js
Last active Apr 30, 2020
Dynamo db json re mapper
View dynamodb-json-mapper.js
/**
MIT License
Copyright (c) 2016 Igor Ivanovic
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@igorzg
igorzg / sbt-install-ubuntu.sh
Created Dec 12, 2016
Sbt install on ubuntu
View sbt-install-ubuntu.sh
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update
sudo apt-get install sbt
@igorzg
igorzg / ubuntu-14.04.LTS-docker-install.sh
Last active Dec 12, 2016
Install docker on ubuntu 14.04 LTS
View ubuntu-14.04.LTS-docker-install.sh
apt-get update
apt-get dist-upgrade -y
apt-get install linux-image-extra-$(uname -r)
apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update -y
apt-get install docker-engine