Difference between revisions of "Accessing server infra"

From stgo
Jump to: navigation, search
(other stuff =)
Line 1: Line 1:
 
== git stuff ==
 
== git stuff ==
git diff
+
*git diff
git pull
+
*git pull
git status
+
*git status
git reset --hard HEAD
+
*git reset --hard HEAD
git reset HEAD~1
+
*git reset HEAD~1
git reset HEAD opentripplanner-api-webapp/src/main/java/org/opentripplanner/api/ws/analyst/IsoChrone.java
+
*git reset HEAD opentripplanner-api-webapp/src/main/java/org/opentripplanner/api/ws/analyst/IsoChrone.java
git log -p
+
*git log -p
git add opentripplanner-api-webapp/src/main/java/org/opentripplanner/api/ws/analyst/IsoChrone.java
+
*git add opentripplanner-api-webapp/src/main/java/org/opentripplanner/api/ws/analyst/IsoChrone.java
git commit -m 'added debug code to be able to figure why some edges are traversed to fast (aside fromom u-shaped roads)'
+
*git commit -m 'added debug code to be able to figure why some edges are traversed to fast (aside fromom u-shaped roads)'
gitk
+
*gitk
git push origin master
+
*git push origin master
git show-ref
+
*git show-ref
git stash list
+
*git stash list
git log origin/master..master
+
*git log origin/master..master
git fetch upstream
+
*git fetch upstream
git remote add upstream https://github.com/openplans/OpenTripPlanner.git
+
*git remote add upstream https://github.com/openplans/OpenTripPlanner.git
git remote show origin
+
*git remote show origin
git remote set-url origin git://github.com/mentaer/OpenTripPlanner.git
+
*git remote set-url origin git://github.com/mentaer/OpenTripPlanner.git
git remote set-url origin git@github.com:mentaer/OpenTripPlanner.git
+
*git remote set-url origin git@github.com:mentaer/OpenTripPlanner.git
git diff > /Volumes/WINDOOF/walkingslopeeffects.patch
+
*git diff > /Volumes/WINDOOF/walkingslopeeffects.patch
patch -p1 -R < IsoChrone2.patch
+
*patch -p1 -R < IsoChrone2.patch
git apply --check /Volumes/WINDOOF/IsoChrone.patch  
+
*git apply --check /Volumes/WINDOOF/IsoChrone.patch  
  
 
== maven stuff ==
 
== maven stuff ==
mvn package -DskipTests
+
*mvn package -DskipTests
  
 
== postgres stuff ==
 
== postgres stuff ==
  
echo 'export PATH=/Library/PostgreSQL/9.2/bin:$PATH' >> ~/.bash_profile
+
*echo 'export PATH=/Library/PostgreSQL/9.2/bin:$PATH' >> ~/.bash_profile
  
psql
+
*psql
sudo mkdir /Library/PostgreSQL/9.2/data/
+
*sudo mkdir /Library/PostgreSQL/9.2/data/
sudo chown postgres /Library/PostgreSQL/9.2/data/
+
*sudo chown postgres /Library/PostgreSQL/9.2/data/
sudo -u postgres initdb -D /Library/PostgreSQL/9.2/data/
+
*sudo -u postgres initdb -D /Library/PostgreSQL/9.2/data/
service postgresql start
+
*service postgresql start
sudo -u postgres pg_ctl -D /Library/PostgreSQL/9.2/data -l logfile start
+
*sudo -u postgres pg_ctl -D /Library/PostgreSQL/9.2/data -l logfile start
sudo -u postgres postgres -D /Library/PostgreSQL/9.2/data &
+
*sudo -u postgres postgres -D /Library/PostgreSQL/9.2/data &
sudo -u postgres createdb santiagotest
+
*sudo -u postgres createdb santiagotest
sudo -u postgres createuser -P -s -e mentaer
+
*sudo -u postgres createuser -P -s -e mentaer
psql santiagotest
+
*psql santiagotest
  
 
== other stuff ===
 
== other stuff ===
gdalinfo cgydem_fromgrid.tif
+
*gdalinfo cgydem_fromgrid.tif
  
 
connect to server:
 
connect to server:

Revision as of 12:38, 11 November 2013

git stuff

  • git diff
  • git pull
  • git status
  • git reset --hard HEAD
  • git reset HEAD~1
  • git reset HEAD opentripplanner-api-webapp/src/main/java/org/opentripplanner/api/ws/analyst/IsoChrone.java
  • git log -p
  • git add opentripplanner-api-webapp/src/main/java/org/opentripplanner/api/ws/analyst/IsoChrone.java
  • git commit -m 'added debug code to be able to figure why some edges are traversed to fast (aside fromom u-shaped roads)'
  • gitk
  • git push origin master
  • git show-ref
  • git stash list
  • git log origin/master..master
  • git fetch upstream
  • git remote add upstream https://github.com/openplans/OpenTripPlanner.git
  • git remote show origin
  • git remote set-url origin git://github.com/mentaer/OpenTripPlanner.git
  • git remote set-url origin git@github.com:mentaer/OpenTripPlanner.git
  • git diff > /Volumes/WINDOOF/walkingslopeeffects.patch
  • patch -p1 -R < IsoChrone2.patch
  • git apply --check /Volumes/WINDOOF/IsoChrone.patch

maven stuff

  • mvn package -DskipTests

postgres stuff

  • echo 'export PATH=/Library/PostgreSQL/9.2/bin:$PATH' >> ~/.bash_profile
  • psql
  • sudo mkdir /Library/PostgreSQL/9.2/data/
  • sudo chown postgres /Library/PostgreSQL/9.2/data/
  • sudo -u postgres initdb -D /Library/PostgreSQL/9.2/data/
  • service postgresql start
  • sudo -u postgres pg_ctl -D /Library/PostgreSQL/9.2/data -l logfile start
  • sudo -u postgres postgres -D /Library/PostgreSQL/9.2/data &
  • sudo -u postgres createdb santiagotest
  • sudo -u postgres createuser -P -s -e mentaer
  • psql santiagotest

other stuff =

  • gdalinfo cgydem_fromgrid.tif

connect to server:

  • ssh stefan@136.159.xxx.xxx
  • ssh sstein@146.155.xxx.xxx.
  • pid
  • kill pid, e.g. kill 320
  • htop
  • process