Skip to content

Instantly share code, notes, and snippets.

@hideojoho
hideojoho / How-to-increase-VM-diskspace.md
Last active April 3, 2023 07:28
How to increase a VM's disk space

How to increase a VM's disk space

Environments

  • Vagrant
  • Virtualbox
  • CentOS 7

Note

The following steps are based on a Vagrant VM box which does NOT use LVM for a root partition, which seems to be the case for the official CentOS box.

@TheDeveloper
TheDeveloper / aws-cluster-stack.yml
Last active February 28, 2024 12:00
Stack to create EC2 instances for ECS cluster.
# Stack to create EC2 instances for ECS cluster.
#
# aws cloudformation deploy \
# --stack-name app-cluster-prod \
# --template-file ./aws-cluster-stack.yaml \
# --parameter-overrides \
# KeyName=DEFAULT \
# SecurityGroups=group1,group2 \
# ImageId=ami-123456 \
# InstanceType=c5.large \
@int128
int128 / RequestAndResponseLoggingFilter.java
Last active January 13, 2024 10:46
Spring Web filter for logging request and response
/*
Copyright 2017 Hidetake Iwata
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@nagataka
nagataka / PrestoJDBC.java
Created April 12, 2017 06:53
Connect to Presto on EMR via JDBC
import java.net.URI;
import java.net.URISyntaxException;
import java.sql.*;
public class PrestoJDBC {
// JDBC driver name and database URL
static final String JDBC_DRIVER = "com.facebook.presto.jdbc.PrestoDriver";
//static final String JDBC_DRIVER = "com.teradata.presto.jdbc42.Driver";
static final String DB_URL = "jdbc:presto://ec2-xx-xx-xxx-xxx.ap-northeast-1.compute.amazonaws.com:8889/hive/default";
@owainlewis
owainlewis / docker-proxy.md
Created March 24, 2017 10:29
Set docker proxy on Ubuntu 16.04

How to setup docker behing a HTTP proxy

mkdir /etc/systemd/system/docker.service.d

sudo touch /etc/systemd/system/docker.service.d/http-proxy.conf

Add proxy info