cd /var/docker
./launcher ssh app
Inside the container:
sudo su - discourse
cd /var/www/discourse
RAILS_ENV=production bundle exec rake assets:clobber assets:precompile
Exit the container with exit twice.
git checkout . | |
git reset --hard HEAD | |
git clean -fdx | |
git pull origin master |
# Add the remote, call it "upstream": | |
git remote add upstream https://github.com/whoever/whatever.git | |
# Fetch all the branches of that remote into remote-tracking branches, | |
# such as upstream/master: | |
git fetch upstream | |
# Make sure that you're on your master branch: |
./buildconf | |
'./configure' '--prefix=/usr/local/opt/php70' '--with-config-file-path=/etc' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--enable-fpm' '--enable-opcache' '--enable-mbstring' '--enable-zip' '--enable-pcntl' '--enable-ftp' '--enable-intl' '--enable-mbstring' '--with-curl' '--with-mcrypt' '--with-iconv' '--with-pdo-mysql=/usr/local/opt/mysql' '--with-gettext=/usr' '--with-zlib=/usr' '--with-mysqli=/usr/local/bin/mysql_config' '--with-gd' '--with-xsl=/usr' '--with-openssl=/usr/local/opt/openssl' '--with-freetype-dir=/usr/local/opt/freetype' '--with-gettext=/usr/local/opt/gettext' '--with-iconv-dir=/usr' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-kerberos=/usr' '--with-libedit' '--with-mhash' '--with-ndbm=/usr' | |
make && make install |
cd /var/docker
./launcher ssh app
Inside the container:
sudo su - discourse
cd /var/www/discourse
RAILS_ENV=production bundle exec rake assets:clobber assets:precompile
Exit the container with exit twice.
//Get change files | |
git archive --format zip -o /Users/khoalengoc/Data/dashboard.zip --prefix html_dashboard/ HEAD $(git diff --diff-filter=AM --name-only e8ea70d89e0225189243c929667d814c4365bf23 779de7332039ffacb605f16c56f94ab65dd8fde3) | |
//Get deleted files | |
git diff --diff-filter=D --name-only 9e6dda0f02bddcf56e135929820c52145a28111a 9adc36f930d0075e3484b8772f7148dc08abddba > /Users/khoalengoc/Data/detele.txt |
lsof -iTCP -i :port #To show all networking related to a given port: | |
lsof -i :22 | |
lsof [email protected] | |
lsof -i| grep LISTEN | |
lsof -u daniel #username | |
lsof -p 10075 #pid | |
lsof +D /dir/ect/ory | |
lsof +d /dir/ect/ory #more simple view | |
lsof /file/name |
//Generate Entity from exist database | |
php app/console doctrine:mapping:import --force LmkUserBundle annotation --filter=User |
This will unstage all files you might have staged with git add: | |
git reset | |
This will revert all local uncommitted changes (should be executed in repo root): | |
git checkout . | |
You can also revert uncommitted changes only to particular file or directory: | |
git checkout [some_dir|file.txt] | |
Yet another way to revert all uncommitted changes (longer to type, but works from any subdirectory): |
//disable all incoming request | |
sudo ufw default deny incoming | |
//allow all outgoing request | |
sudo ufw default allow outgoing | |
//allow ssh | |
sudo ufw allow ssh | |
//or | |
sudo ufw allow 22/tcp | |
//allow http |
php app/console doctrine:mapping:import --force LmkWebBundle annotation --filter=Post | |