Skip to content

Instantly share code, notes, and snippets.

View Sacristan's full-sized avatar

Ģirts Ķesteris Sacristan

View GitHub Profile
Pre-Alpha: the first stage of development, if a previous game was made that had a similar engine to the one going to be used, it uses the previous games engine, the engine controls everything in the game;
Alpha: Similar to pre-alpha, but most major levels and maps are completed, some slightly revamped textures now exist;
Beta: Very similar to the final stage of the game, usually the stage where things in the game are given there semi-final test;
Delta: A very short testing stage;
Final Product: This is what well pick up in stores and will enjoy.
DB -> Local
ssh [email protected]
pg_dump --format=c -h localhost --username norden nordenhealth > latest.dump
scp [email protected]:/home/deployer/latest.dump ~/Desktop/
source ~/.bashrc && rake db:drop && rake db:create && pg_restore --verbose --clean --no-acl --no-owner -h localhost -U sac -d nordenhealth_development ~/Desktop/latest.dump
rake db:migrate RAILS_ENV=test && rake db:seed RAILS_ENV=test
Local -> DB
source ~/.bashrc && pg_dump --format=c -h localhost --username sac nordenhealth_development > ~/Desktop/t_latest.dump
scp ~/Desktop/t_latest.dump [email protected]:/home/deployer/t_latest.dump
@Sacristan
Sacristan / dev user
Created June 10, 2014 20:06
Rails create posgres user -> superuser and login
sudo su postgres -c psql
postgres=# CREATE ROLE <username> SUPERUSER LOGIN;
postgres=# \q
@Sacristan
Sacristan / check unix relative dir disk space
Created June 12, 2014 12:55
check unix relative dir disk space
du --max-depth=1 2> /dev/null | sort -n -r | head -n20
@Sacristan
Sacristan / deploy ssh key remotely
Created June 12, 2014 18:43
deploy ssh key remotely
1. gem uninstall net-ssh
2. bundle install
3. sudo curl https://raw.githubusercontent.com/beautifulcode/ssh-copy-id-for-OSX/master/ssh-copy-id.sh -o /usr/local/bin/ssh-copy-id
4. sudo chmod +x /usr/local/bin/ssh-copy-id
5. ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
sudo apt-get install postgresql postgresql-contrib
sudo -u postgres createuser sac
@Sacristan
Sacristan / gist:21c1129f1c470a97936c
Created June 26, 2014 17:04
Create Postgres superuser
sudo su postgres -c psql
ALTER USER myuser WITH SUPERUSER;
@Sacristan
Sacristan / config.fish
Created July 1, 2014 10:30
my fish config
# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish
set fish_plugins git rails rvm
# Theme
set fish_theme robbyrussell
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-fish/plugins/*)
# Custom plugins may be added to ~/.oh-my-fish/custom/plugins/
# Example format: set fish_plugins autojump bundler
@Sacristan
Sacristan / NEWdump
Last active February 1, 2016 09:30
new dump
ssh deployer@$ip
pg_dump --format=c -h localhost --username norden nordenhealth > latest.dump
scp deployer@$ip:/home/deployer/latest.dump ~/Desktop/
rake db:drop db:create;and pg_restore --verbose --clean --no-acl --no-owner -h localhost -U girts -d nordenhealth_development ~/Desktop/latest.dump
@Sacristan
Sacristan / gist:1a65033309e13cd97b01
Last active August 29, 2015 14:03
check banklink transaction 1001 code
for TRANS in `cat ~/transactions`; do echo "__"$TRANS"__" && cat ~/apps/nordenhealth/shared/log/unicorn.log | grep '"VK_SERVICE"=>"1101"' | grep '"VK_STAMP"=>"'$TRANS'"' ; done
for TRANS in `echo 102344`; do echo "__"$TRANS"__" && cat ~/apps/nordenhealth/shared/log/unicorn.log | grep '"VK_SERVICE"=>"1101"' | grep '"VK_STAMP"=>"'$TRANS'"' ; done