Skip to content

Instantly share code, notes, and snippets.

Tomas Salazar atomsfat

Block or report user

Report or block atomsfat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@atomsfat
atomsfat / grails_tips.txt
Last active Sep 29, 2015
Graiis tips and tricks
View grails_tips.txt
#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 Sep 29, 2015
Git tips and trips
View git_tips.txt
#ignore changes:
git reset --hard
#delete remote branch
git push origin :newfeature
#delete local branch
git branch -d the_local_branch
@atomsfat
atomsfat / profile_linux.txt
Last active Sep 29, 2015
linux profile for java
View profile_linux.txt
/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 / java_linux
Last active Jun 4, 2018
Java linux update-alternatives
View java_linux
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_25/bin/java" 2
sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0_25/bin/java
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_25/bin/javac" 2
sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0_25/bin/javac
/usr/lib/mozilla/plugins
sudo ln -s /opt/java/jdk1.7.0_25/jre/lib/i386/libnpjp2.so
sudo ln -s /opt/java/jdk1.7.0_25/jre/lib/amd64/libnpjp2.so
@atomsfat
atomsfat / basic_load_balancer_apache
Created Jan 17, 2012
Basic load balancer Apache
View 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 Jan 17, 2012
Basic tomcat configuration for load balancing
View server.xml
<?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
View Arduino_telnet_Server.pde
/* *
* Arduino Telnet Server *
* 7 July 2010 *
* Basic Arduino I/O via *
* a command line interface *
* by Steve Lentz *
* stlentz[at]gmail[dot]com *
Quick Start Instructions:
1) Set Ethernet address in code below.
@atomsfat
atomsfat / gist:5659302
Created May 27, 2013
smart command to troubleshoot permission on directories
View gist:5659302
dir=/tmp/level1/level2/level3/level4/level5/level6; while [ "$dir" != "/" ]; do ls -ald $dir; dir=`dirname $dir`; done
@atomsfat
atomsfat / switchWorkspace.sh
Last active Dec 19, 2015
Switch workspace every certain time, util for DIY dashboard
View switchWorkspace.sh
#!/bin/bash
NUMBER_DESkTOP="$(xdotool get_num_desktops)"
CURRENT="0"
echo "Press [CTRL+C] to stop.."
while :
do
xdotool set_desktop $CURRENT
#echo $CURRENT
CURRENT="$(expr $CURRENT + '1')"
if [ "$CURRENT" -gt $NUMBER_DESkTOP ]; then
@atomsfat
atomsfat / backup.sh
Last active Dec 21, 2015
Mysql backup shell
View backup.sh
#!/bin/bash
fecha=$(date +%Y%m%d_%H%M)
echo "ready to dump database"
mysqldump -u root database --ignore-table=logs > /tmp/dump-$fecha.sql
echo "comprimiendo"
pbzip2 /tmp/dump-$fecha.sql
You can’t perform that action at this time.