Skip to content

Instantly share code, notes, and snippets.

View mmaravich's full-sized avatar

Mladen Maravić mmaravich

  • Curl Services Ltd
  • 01:07 (UTC +02:00)
View GitHub Profile
@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;
package org.springframework.core.convert.converter;
public interface Converter<S, T> {
T convert(S source);
}
<beans:bean id="userDetailsService" class="x.y.z.UserDetailsService" />
<beans:bean id="yubikeyAuthenticationProvider"
class="com.curlapp.yubikey.YubikeyAuthenticationProvider"
p:userDetailsService-ref="userDetailsService"
p:yubicoClientId="******" />
<authentication-manager alias="authenticationManager">
<authentication-provider ref="yubikeyAuthenticationProvider"/>
</authentication-manager>