Skip to content

Instantly share code, notes, and snippets.

@mkjsix
mkjsix / pom.xml
Created September 3, 2015 14:38
POM file for Sparkjava using the Maven Shade plugin
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.softinstigate</groupId>
<artifactId>meteo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>meteo</name>
<properties>
@mkjsix
mkjsix / 0_reuse_code.js
Created December 28, 2015 10:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mkjsix
mkjsix / JSONizable.java
Created October 20, 2016 13:09
JSONizable is a Java interface which uses Gson to serialize Java objects to JSON and viceversa
package com.softinstigate.util;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
/**
*
* @author mturatti
*/
public interface JSONizable {
@mkjsix
mkjsix / git-all.sh
Last active March 28, 2018 16:01
Apply a git command recursively in all folders
#!/bin/bash
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git $1" \;
@mkjsix
mkjsix / regioni-con-trento-bolzano.geojson
Created April 19, 2017 10:36 — forked from davidejmancino/regioni-con-trento-bolzano.geojson
Confini amministrativi delle regioni italiane, con le province di Trento e Bolzano mostrate separatamente
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mkjsix
mkjsix / regioni.geojson
Created April 19, 2017 10:37 — forked from davidejmancino/regioni.geojson
Confini amministrativi delle regioni italiane
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mkjsix
mkjsix / province.geojson
Created April 19, 2017 10:37 — forked from davidejmancino/province.geojson
Confini amministrativi delle province italiane
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mkjsix
mkjsix / maven-compiler-plugin
Created May 18, 2017 11:07
maven-compiler-plugin configuration to detect Java warnings and deprecations
<project>
...
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
@mkjsix
mkjsix / delete-docker.sh
Last active June 1, 2017 10:17
Delete all Docker images and containers
# Delete every non-running Docker container
docker rm -f $(docker ps -a -q)
# Delete every Docker image for non-running containers
docker rmi -f $(docker images -q)
@mkjsix
mkjsix / describe-log-groups.sh
Last active October 18, 2019 07:30
Describe AWS CloudWatch Log Groups for a profile and a region
#!/bin/bash
export AWS_PROFILE=$1
export AWS_REGION=$2
echo "AWS_PROFILE=$AWS_PROFILE, AWS_REGION=$AWS_REGION"
aws logs --region "$AWS_REGION" describe-log-groups --query 'logGroups[*].[logGroupName]' | grep / | sed 's/"//g'