Skip to content

Instantly share code, notes, and snippets.

View atomsfat's full-sized avatar
🏠
Working from home

Tomás atomsfat

🏠
Working from home
View GitHub Profile
@atomsfat
atomsfat / concurrent
Created April 21, 2014 21:16
concurrent closuere
def concurrent(int count, Closure closure) {
def values = []
def futures = []
ExecutorService executor = Executors.newFixedThreadPool(count)
CyclicBarrier barrier = new CyclicBarrier(count)
for (int i = 0; i < count; i++) {
futures.add(executor.submit(new Callable() {
public def call() throws Exception {
@atomsfat
atomsfat / Ingreso Proyecto
Last active August 29, 2015 14:08
Proyecto GEX Developer SR
Construir una api REST, para hacer altas, bajas cambios de usuarios, documentar la API.
Utilizar las siguientes tecnologias.
* Spring Boot
* PostgreSQL hibernate o Gorm
* Gradle
@atomsfat
atomsfat / docker_acordeon.txt
Created November 5, 2014 17:34
docker acordeon
boot2docker ip →Get lP
docker info
docker rm <name>
docker stop <name>
docker start <name>
docker attach <name>
docker ps -a
docker logs -f <name>
docker top <name>
docker inspect <name>
@atomsfat
atomsfat / gist:dc2ede8cbea2f397cd7f
Created February 25, 2015 18:33
raml2code build
#!/bin/bash
git@github.com:gextech/json-schema-2-groovy-pojo.git
git@github.com:gextech/json-schema-java-mapper-utils.git
git@github.com:atomsfat/raml2code.git
git@github.com:atomsfat/raml2code-fixtures.git
git@github.com:gextech/raml2code-jaxrs-interfaces.git
git@github.com:gextech/raml2code-retrofit.git
git@github.com:gextech/ram2code-utils.git
@atomsfat
atomsfat / profile_linux.txt
Last active September 29, 2015 11:47
linux profile for java
/etc/profile
export GROOVY_HOME='/opt/groovy/groovy-1.8.0'
export PATH=$PATH:/opt/grails:$GROOVY_HOME/bin
export GRAILS_HOME='/opt/grails/grails-1.3.4'
export JAVA_HOME='/opt/java/jdk1.6.0_25'
export NODE_PATH=/opt/node:/opt/node/lib/node_modules
export GRADLE_HOME=/opt/gradle/gradle-1.0-milestone-6
export PATH=$PATH:$GRADLE_HOME/bin
alias psg='ps -fea | grep $@'
@atomsfat
atomsfat / grails_tips.txt
Last active September 29, 2015 11:48
Graiis tips and tricks
#switch config:
grails -Dgrails.env=development switch-config clickonmx
#make war:
grails -Dgrails.env=development war target/cooldeals-lat-0.3.2.war
#running test:
grails test-app class-name -integration
#no interactive console
grails run-app --non-interactive
@atomsfat
atomsfat / git_tips.txt
Last active September 29, 2015 11:48
Git tips and trips
#ignore changes:
git reset --hard
#delete remote branch
git push origin :newfeature
#delete local branch
git branch -d the_local_branch
@atomsfat
atomsfat / basic_load_balancer_apache
Created January 17, 2012 16:50
Basic load balancer Apache
############################
# Load Balancer
############################
<VirtualHost *:80>
ServerName atomsfat.net
<Location "/manage-balancer">
SetHandler balancer-manager
AuthType Basic
AuthName "System challenge"
@atomsfat
atomsfat / server.xml
Created January 17, 2012 17:04
Basic tomcat configuration for load balancing
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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
@atomsfat
atomsfat / gist:5659302
Created May 27, 2013 22:03
smart command to troubleshoot permission on directories
dir=/tmp/level1/level2/level3/level4/level5/level6; while [ "$dir" != "/" ]; do ls -ald $dir; dir=`dirname $dir`; done