Skip to content

Instantly share code, notes, and snippets.

View jenciso's full-sized avatar
🎯
Focusing in procrastinate

Juan Enciso jenciso

🎯
Focusing in procrastinate
View GitHub Profile
@jenciso
jenciso / folder_structure.md
Created June 11, 2024 11:55 — forked from ayoubzulfiqar/folder_structure.md
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@jenciso
jenciso / kubectl.md
Created March 27, 2022 12:52 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
FROM ruby:alpine
RUN apk add build-base && \
rm -rf /var/cache/apk/*
RUN mkdir /app
COPY . /app/
WORKDIR /app
RUN bundle install
package hello;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
@jenciso
jenciso / App.java
Created December 20, 2021 02:51
create-a-simple-spring-boot-application-with-gradle
package hello;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
@jenciso
jenciso / build.gradle
Created December 20, 2021 02:48
create-a-simple-spring-boot-application-with-gradle
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building a CLI application.
id 'application'
// Spring Boot plugins
id 'org.springframework.boot' version '2.0.5.RELEASE'
id 'io.spring.dependency-management' version '1.0.7.RELEASE'
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
cat << 'EOF' > ~/.vimrc
syntax on
filetype plugin indent on
call plug#begin('~/.vim/plugged')
Plug 'morhetz/gruvbox'
Plug 'sainnhe/gruvbox-material'
sudo amazon-linux-extras install -y epel
sudo yum install -y ansible
mkdir ~/ansible
cat << 'EOF' > ~/.ansible.cfg
[defaults]
inventory=~/ansible/hosts
roles_path= ~/ansible/roles
retry_files_enabled=False
sudo amazon-linux-extras install -y docker
sudo systemctl enable docker && sudo systemctl start docker
sudo usermod -a -G docker ec2-user
sudo curl -L "https://github.com/docker/compose/releases/download/1.28.6/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
@jenciso
jenciso / install-docker-centos7.sh
Last active July 6, 2021 17:08
Installing docker-ce on Centos 7
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker && sudo systemctl enable docker
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose