Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##nodejs
- sudo apt-get install curl
- curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
- sudo apt-get install -y nodejs
- ##nginx
- sudo apt-get install nginx
- sudo subl /etc/apt/sources.list.d/nginx.list
- #and add this
- -------------------------------------------------------
- deb http://nginx.org/packages/ubuntu/ xenial nginx
- #deb-src http://nginx.org/packages/ubuntu/ xenial nginx
- -------------------------------------------------------
- sudo apt-get update
- sudo apt-get install nginx ##say yes to istall without verification
- ## Replace $key with the corresponding $key from your GPG error.
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
- sudo apt-get update
- sudo apt-get install nginx
- #cron
- sudo apt-get install cron
- #wkhtmltopdf
- sudo apt-get install wkhtmltopdf
- #mariadb
- sudo apt-get install software-properties-common
- sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
- sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.2/ubuntu xenial main'
- sudo apt-get update
- sudo apt-get install mariadb-server
- ## mariapass is the password for the root user
- # Disable fibregrid.in in the Softwares and Updates in Settings, since it doesn't update mariadb for somereason
- #redis
- sudo apt-get install redis-server
- #frappe bench
- virtualenv -p /usr/bin/python2.7 /media/coding_coffee/sd5/Frappe/frappe
- . /media/coding_coffee/sd5/Frappe/frappe/bin/activate
- git clone https://github.com/frappe/bench bench-repo
- pip install -e bench-repo
- bench init frappe-bench && cd frappe-bench
- #Add the following line to mariadb.cnf
- sudo subl /etc/mysql/conf.d/mariadb.cnf
- ==========================================
- [mysqld]
- innodb-file-format=barracuda
- innodb-file-per-table=1
- innodb-large-prefix=1
- character-set-client-handshake = FALSE
- character-set-server = utf8mb4
- collation-server = utf8mb4_unicode_ci
- [mysql]
- default-character-set = utf8mb4
- ==========================================
- #Restart mysql server
- service mysql start
- service mysql stop
- bench new-site site1.local
- #use mariadb password
- bench get-app erpnext https://github.com/frappe/erpnext
- bench --site site1.local install-app erpnext
- bench start
- #Incase you want to reinstall
- bench --site site1.local reinstall
- #User: Administrator
- #Pass: frappepass
- ###############################################
- ##To create new apps
- $ bench new-app library_management
- App Title (defaut: Lib Mgt): Library Management
- App Description: App for managing Articles, Members, Memberships and Transactions for Libraries
- App Publisher: Frappe
- App Email: info@frappe.io
- App Icon (default 'octicon octicon-file-directory'): octicon octicon-book
- App Color (default 'grey'): #589494
- App License (default 'MIT'): GNU General Public License
- bench new-site library
- bench use library
- bench --site library install-app library_management
- ################################################
- ## Testing framework
- # add this to bashrc
- # Purpose: to execute npm modules installed locally
- function npm-do { (PATH=$(npm bin):$PATH; eval $@;) }
- ##
- npm install testcafe
- npm install electron
- npm install nightmare
- npm install testcafe-browser-provider-nightmare
- npm install jquery
- ################################################
- Question: I have a local repo. I created the whole app but now I want to push it to remote repo. I already have remote repo as well. How can I connect these two repos without losing any work that I did?
- Solution:
- $
- $ git pull
- $ git push --all --set-upstream origin
- #### Something horribly went wrong... dont do this
- ################################################
- #github tutorial
- $ git branch #gives list of branches
- $ git branch feature1 #creates a new branch named feature1
- $ git checkout feature1 #switches to feature1 branch
- # work on your new branch
- $ git checkout master #switch to master branch
- $ git pull #to check if nothing has changed in the master while we were working on our repo in the feature1 branch
- $ git checkout feature1 #switch to feature1 branch
- $ git merge master #to merge with master branch #if there were any changes to master while you were developing, there'll be a merge conflict .... and you'll be able to see what the conflct is ... whatever comes under head will be what you added, however what comes after that will be what change was made to the master ... you need to fix that by rewriting the code
- $ git add .
- $ git commit -m 'crap'
- # if you see a big long commit message do "\ESC :wq"
- $ git push origin feature1
- # goto github.com and create a new pull request using the feature1 branch
- # and then merge the pull request, it is a bad idea to merge your own pull request
- # then delete your branch because OCDs
- $ git checkout master
- $ git pull
- ################################################
- ~frappe
- (frappE) ➜ frappe git:(develop) git remote -v
- upstream https://github.com/frappe/frappe.git (fetch)
- upstream https://github.com/frappe/frappe.git (push)
- (frappE) ➜ frappe git:(develop) git remote add origin https://github.com/codingCoffee/frappe
- (frappE) ➜ frappe git:(develop) bench start
- 2017-06-19 18:01:59 [17675] [ERROR] Procfile does not exist or is not a file
- (frappE) ➜ frappe git:(develop) git remote -v
- origin https://github.com/codingCoffee/frappe (fetch)
- origin https://github.com/codingCoffee/frappe (push)
- upstream https://github.com/frappe/frappe.git (fetch)
- upstream https://github.com/frappe/frappe.git (push)
- (frappE) ➜ frappe git:(develop) git fetch
- git pull
- ~frappe-bench
- bench setup requirements
- # Dont ever use 'bench use' so delete eveything from sites/currentsite.txt
- subl sites/currentsite.txt
- # To run ui tests on the site
- bench --site site1.local run-ui-tests
- # To update the database schema whenever you pull updates
- bench --site site1.local migrate #(or you could use `$ bench update`, it'll do it for all the sites)
- ## Add this to /etc/hosts to access sites using the {sitename} instead of localhost
- $ sudo subl /etc/hosts
- 127.0.0.1 site1.local
- 127.0.0.1 library
- ========================================================================================
- ERPNext conference website
- ========================================================================================
- get-app erpnext_conference https://github.com/codingCoffee/erpnext_conference.git
- bench new-site erpnext_conf_site
- bench --site erpnext_conf_site install-app erpnext_conference
- ------------------------------------------------------------------------------------------
- Date: 3rd July, 2017
- Reason: When bench migrate doesn't work
- coding_coffee@ubuntu-demigod-von-L:/media/coding_coffee/sd5/Frappe/frappe-bench/apps/frappe (branch: develop)
- $ git checkout develop
- $ git pull
- $ git pull upstream develop
- coding_coffee@ubuntu-demigod-von-L:/media/coding_coffee/sd5/Frappe/frappe-bench/apps/erpnext (branch: develop!)
- $ git checkout develop
- $ git pull
- coding_coffee@ubuntu-demigod-von-L:/media/coding_coffee/sd5/Frappe/frappe-bench
- $ bench --site site1.local reinstall
- In Google Chrome browser
- - Ctrl + Shift + C
- - F1
- - disable cache while devTools is running
- ------------------------------------------------------------------------------------------
- $ git add .
- $ git status
- $ git reset HEAD frappe/tests/ui/test_global_search.js.ignore
- $ git status
- $ git commit -m "refactored test_desktop, added test_calendarView, added custom functions to test_lib"
- $ git checkout develop
- $ git pull --rebase upstream develop
- $ git checkout UI_testing_desktop
- $ git log
- $ git push origin UI_testing_desktop:develop
- ------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement