Skip to content

Instantly share code, notes, and snippets.

View julian-garrido's full-sized avatar

Julián Garrido julian-garrido

View GitHub Profile
@julian-garrido
julian-garrido / gipsyInstallation
Last active June 27, 2019 07:12
Install gipsy in ubuntu 12.04
# -q -y options in apt-get install will assume “yes” to everything (and do it quietly). v.g. sudo apt-get -q -y install <package_name>
sudo apt-get update
sudo apt-get install tcsh
sudo apt-get install gfortran
sudo apt-get install xaw3dg-dev
sudo apt-get install xaw3dg
sudo apt-get install libxt6
@julian-garrido
julian-garrido / RecoverPassword
Created May 29, 2014 08:17
Recover password in ubuntu (linux) and OS
In unix:
1. Start using grub (if grub doesn't appear, press shift key during booting)
2.- Choose recovery mode (usually the second option).
3.- In the next submenu, choose "netroot" ("root" in newer versions) --> we will be prompt as superusers without asking for password
4.- You will need write rights (by the default the / is mount as read only)
mount -rw -o remount /
5.- Change the password
passwd your user_name
ej. passwd julian
@julian-garrido
julian-garrido / gitCommands
Created May 30, 2014 08:50
GIT and maven commands
BASIC
————————————————————————————————————
SETP UP GIT
http://help.github.com/linux-set-up-git/
cd ~/.ssh
ssh-keygen -t rsa -C "jgarrido@*****"
@julian-garrido
julian-garrido / MySQLdb
Created June 10, 2014 11:40
MySQLdb installation and bug solving
All the steps are needed because of library dependencies:
1.- Download and Install mysql from: http://www.mysql.com/downloads/mysql/
2.- install mysql-python
a) If you install it using pip install mysql-python: it will be installed at /Library/Python/2.6/site-packages/...
b) If you install it downloading the src and building it, it is installed at /LibraryFrameworks/Python.framework/Version/2.7/lib/python2.7/site-packages
i) This is the option that worked for me because the system had 2.6 but I was using python 2.7.
ii) Download the code from http://sourceforge.net/projects/mysql-python/?source=dlp
iii) python setup.py build
iv) sudo python setup.py install
@julian-garrido
julian-garrido / Tomcat Server
Created August 8, 2014 08:29
Install and set up tomcat7 server in ubuntu. Use https protocol
Tomcat installation:
sudo apt-get install tomcat7 (Minimun installation)
sudo apt-get install tomcat7-admin tomcat7-common tomcat7-docs tomcat7-examples
This installation implies that tomcat is installed as a service. /usr/share/tomcat7/bin/startup.sh cannot be used to start tomcat.
Set up environment variables. Edit .bashrc and add:
export JAVA_HOME=/usr/lib/jvm/default-java
export CATALINA_HOME=/usr/share/tomcat7
@julian-garrido
julian-garrido / find_command
Last active October 29, 2020 13:25
Different use cases for find command
#find files that ends in .py with a tgz
tar -tzf tmp.tgz | grep $*.tgz$
#find files that ends in .py in all the tgz files that you may find
find ./ -name "*.tgz" -execdir sh -c 'tar -tzf {} | grep $*.py$' \;
#find files greater than X MB and show path and size
find . -type f -size +800M -exec ls -lh {} \;
tested in OS 10.9.5
Configure Postfix for Gmail SMTP
Edit file /etc/postfix/main.cf
sudo vim /etc/postfix/main.cf
and add in the following below the commented out relayhosts :-
relayhost = [smtp.gmail.com]:587
wget --wait=2 --level=inf --limit-rate=20K --recursive --page-requisites --user-agent=Mozilla --no-parent --convert-links --adjust-extension --no-clobber -e robots=off https://spain.skatelescope.org/