Skip to content

Instantly share code, notes, and snippets.

View mmaravich's full-sized avatar

Mladen Maravić mmaravich

  • 16:43 (UTC +02:00)
View GitHub Profile
@mmaravich
mmaravich / script.sh
Created April 9, 2025 08:03
AWS Remove All Default VPCs
#/usr/bin/env bash
export REGIONS=$(aws ec2 describe-regions | jq -r ".Regions[].RegionName")
for region in $REGIONS; do
# list vpcs
echo $region
aws --region=$region ec2 describe-vpcs | jq ".Vpcs[]|{is_default: .IsDefault, cidr: .CidrBlock, id: .VpcId} | select(.is_default)"
done
@mmaravich
mmaravich / aws_delete-default-vpc.sh
Created March 3, 2025 12:36 — forked from craigw/aws_delete-default-vpc.sh
Script to delete all AWS default VPCs from all regions using AWS CLI
#!/usr/bin/env bash
set -euo pipefail
for AWS_REGION in $(aws ec2 describe-regions --region eu-west-1 --query '[Regions[].RegionName]' --output text); do
echo -n "* Region ${AWS_REGION}: "
export AWS_REGION
# get default vpc
vpc=$(aws ec2 describe-vpcs --filter Name=isDefault,Values=true --query "Vpcs[0].VpcId" --output text)
@mmaravich
mmaravich / delete-default-vpcs.sh
Created October 25, 2021 06:27
Script to delete all AWS default VPCs in an account. Safe to use from AWS Shell in AWS console.
#!/usr/bin/env bash
for region in $(aws ec2 describe-regions --region eu-west-1 | jq -r .Regions[].RegionName); do
echo "* Region ${region}"
# get default vpc
vpc=$(aws ec2 --region ${region} describe-vpcs --filter Name=isDefault,Values=true | jq -r .Vpcs[0].VpcId)
if [ "${vpc}" = "null" ]; then
echo "No default vpc found"
package com.example.demo;
import java.io.Serializable;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.repository.support.MongoRepositoryFactoryBean;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.core.support.RepositoryFactorySupport;
import org.springframework.data.repository.query.QueryLookupStrategy.Key;
public class InheritanceAwareMongoRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extends Serializable> extends
package com.example.demo;
import java.lang.reflect.Method;
import java.util.Optional;
import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.mongodb.repository.query.MongoQueryMethod;
import org.springframework.data.mongodb.repository.query.PartTreeMongoQuery;
package com.example.demo;
import static org.springframework.data.mongodb.core.query.Criteria.where;
import org.springframework.data.annotation.TypeAlias;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.repository.query.ConvertingParameterAccessor;
import org.springframework.data.mongodb.repository.query.MongoQueryMethod;
package com.example.demo;
import static org.springframework.data.mongodb.core.query.Criteria.where;
import java.io.Serializable;
import java.util.List;
import org.bson.Document;
import org.springframework.data.annotation.TypeAlias;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.query.Criteria;
@mmaravich
mmaravich / README.md
Created July 7, 2017 17:40 — forked from KonradIT/readme.md
GoPro Studio for Linux

####GoPro Protune correction, timelapse assembling, fisheye removal, slow motion, 4:3 to 16:9 and motion blur in Linux OS - GoPro Studio for Linux - KDEnlive, FFMPEG, ImageMagick, Mencoder and Python!

GoPro Studio has been tremendously useful for GoPro users, but not all GoPro users can enjoy the tool, there is no GoPro Studio for Linux. So some users made their ways to emulate GoPro Studio on Linux.

This guide is more than GoPro Studio, is a must read guide for Linux and GoPro users.

The main features of GoPro Studio are:

  • Convert and edit Protune footage and apply Protune effect.
  • Convert 4:3 footage to 16:9
  • Slow motion
package com.example.groovy
import groovy.json.JsonBuilder
import groovy.json.JsonSlurper
import groovy.transform.ToString
/**
* Created by rhasija on 1/15/16.
* Modified by esikgabi on 1/26/16.
**/
import java.util.Set;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.converter.Converter;