I created a method called po to streamline commits using an AI-driven approach for
generating concise commit messages. This function can be added to your .zshrc or
.bashrc.
- Add All Changes:
Undo a local merge (not comited/pushed yet)
git reset --hard <last-commit-id>
Above command will move to the state of the last commit, ignoring all the changes.
If you want to push after a hard reset, use -f option
git push origin <branch-name> -f
To checkout by folder
git checkout master -- db/migrate
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-monit
check process pt-rpush with pidfile /srv/www/packagetracker/shared/pids/rpush.pid
start program = "/etc/init.d/pt-rpush start"
stop program = "/etc/init.d/pt-rpush stop"
#!/bin/sh
###rpush - https://github.com/rpush/rpush
Follow the steps in rpush to add the gem to your rails project
####PushNotificationDevice
rails g model PushNotificationDevice device_type:integer:index device_token:string
class CreatePushNotificationDevices < ActiveRecord::Migration
Rspec ??
###Read again
###Gemfile
group :development, :test do
gem 'rspec-rails'
gem 'factory_girl_rails'
| install android sdk | |
| download android sdk alone | |
| unzip it | |
| move a safe folder(remember the path) | |
| set the ANDROID_HOME | |
| export ANDROID_HOME=/home/user/android-sdk-linux | |
| export ANDROID_HOME=~/android-sdk-linux | |
| export PATH=$ANDROID_HOME/tools:$PATH | |
| export PATH=$ANDROID_HOME/platform-tools:$PATH |
####Install the whole package
sudo apt-get install postgresql postgresql-contrib
####Install pgAdmin III - a handy GUI for PostgreSQL
sudo apt-get install pgadmin3
####Setup
#####Login to postgres sql prompt
sudo -u postgres psql postgres
#####Change the postgres user password
\password postgres
//= require bootstrap*= require bootstrapTo install sublime text 3 sudo add-apt-repository ppa:webupd8team/sublime-text-3 sudo apt-get update sudo apt-get install sublime-text-installer More Info: http://askubuntu.com/questions/172698/how-do-i-install-sublime-text-2-3
To install Package Control https://sublime.wbond.net/installation#st2
| How to add sudo permission to a particular command for a user | |
| Following example illustrates how to add apache restart access to the user nih | |
| Login as root user | |
| Then open visudo by typing in | |
| visudo | |
| Add the command to the end of the file | |
| #username# ALL= NOPASSWD: #command# | |
| nih ALL= NOPASSWD: /etc/init.d/httpd restart |