Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.86 KB | None | 0 0
  1.  
  2. ##nodejs
  3. sudo apt-get install curl
  4. curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
  5. sudo apt-get install -y nodejs
  6.  
  7.  
  8.  
  9.  
  10. ##nginx
  11. sudo apt-get install nginx
  12. sudo subl /etc/apt/sources.list.d/nginx.list
  13. #and add this
  14. -------------------------------------------------------
  15. deb http://nginx.org/packages/ubuntu/ xenial nginx
  16. #deb-src http://nginx.org/packages/ubuntu/ xenial nginx
  17. -------------------------------------------------------
  18.  
  19. sudo apt-get update
  20. sudo apt-get install nginx ##say yes to istall without verification
  21.  
  22. ## Replace $key with the corresponding $key from your GPG error.
  23. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
  24. sudo apt-get update
  25. sudo apt-get install nginx
  26.  
  27.  
  28.  
  29.  
  30. #cron
  31. sudo apt-get install cron
  32.  
  33. #wkhtmltopdf
  34. sudo apt-get install wkhtmltopdf
  35.  
  36. #mariadb
  37. sudo apt-get install software-properties-common
  38. sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
  39. sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://mirrors.tuna.tsinghua.edu.cn/mariadb/repo/10.2/ubuntu xenial main'
  40. sudo apt-get update
  41. sudo apt-get install mariadb-server
  42. ## mariapass is the password for the root user
  43. # Disable fibregrid.in in the Softwares and Updates in Settings, since it doesn't update mariadb for somereason
  44.  
  45.  
  46. #redis
  47. sudo apt-get install redis-server
  48.  
  49.  
  50. #frappe bench
  51. virtualenv -p /usr/bin/python2.7 /media/coding_coffee/sd5/Frappe/frappe
  52. . /media/coding_coffee/sd5/Frappe/frappe/bin/activate
  53. git clone https://github.com/frappe/bench bench-repo
  54. pip install -e bench-repo
  55. bench init frappe-bench && cd frappe-bench
  56.  
  57. #Add the following line to mariadb.cnf
  58. sudo subl /etc/mysql/conf.d/mariadb.cnf
  59. ==========================================
  60.  
  61. [mysqld]
  62. innodb-file-format=barracuda
  63. innodb-file-per-table=1
  64. innodb-large-prefix=1
  65. character-set-client-handshake = FALSE
  66. character-set-server = utf8mb4
  67. collation-server = utf8mb4_unicode_ci
  68.  
  69. [mysql]
  70. default-character-set = utf8mb4
  71.  
  72. ==========================================
  73.  
  74. #Restart mysql server
  75. service mysql start
  76. service mysql stop
  77.  
  78. bench new-site site1.local
  79. #use mariadb password
  80.  
  81. bench get-app erpnext https://github.com/frappe/erpnext
  82. bench --site site1.local install-app erpnext
  83. bench start
  84.  
  85.  
  86. #Incase you want to reinstall
  87. bench --site site1.local reinstall
  88. #User: Administrator
  89. #Pass: frappepass
  90.  
  91.  
  92. ###############################################
  93.  
  94. ##To create new apps
  95. $ bench new-app library_management
  96. App Title (defaut: Lib Mgt): Library Management
  97. App Description: App for managing Articles, Members, Memberships and Transactions for Libraries
  98. App Publisher: Frappe
  99. App Email: info@frappe.io
  100. App Icon (default 'octicon octicon-file-directory'): octicon octicon-book
  101. App Color (default 'grey'): #589494
  102. App License (default 'MIT'): GNU General Public License
  103.  
  104. bench new-site library
  105.  
  106. bench use library
  107.  
  108. bench --site library install-app library_management
  109.  
  110.  
  111. ################################################
  112. ## Testing framework
  113. # add this to bashrc
  114. # Purpose: to execute npm modules installed locally
  115. function npm-do { (PATH=$(npm bin):$PATH; eval $@;) }
  116.  
  117. ##
  118.  
  119. npm install testcafe
  120. npm install electron
  121. npm install nightmare
  122. npm install testcafe-browser-provider-nightmare
  123. npm install jquery
  124.  
  125.  
  126. ################################################
  127.  
  128. 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?
  129. Solution:
  130. $
  131. $ git pull
  132. $ git push --all --set-upstream origin
  133.  
  134. #### Something horribly went wrong... dont do this
  135.  
  136. ################################################
  137.  
  138. #github tutorial
  139.  
  140. $ git branch #gives list of branches
  141. $ git branch feature1 #creates a new branch named feature1
  142. $ git checkout feature1 #switches to feature1 branch
  143.  
  144. # work on your new branch
  145.  
  146. $ git checkout master #switch to master branch
  147. $ git pull #to check if nothing has changed in the master while we were working on our repo in the feature1 branch
  148.  
  149. $ git checkout feature1 #switch to feature1 branch
  150. $ 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
  151.  
  152. $ git add .
  153. $ git commit -m 'crap'
  154. # if you see a big long commit message do "\ESC :wq"
  155.  
  156. $ git push origin feature1
  157.  
  158. # goto github.com and create a new pull request using the feature1 branch
  159. # and then merge the pull request, it is a bad idea to merge your own pull request
  160. # then delete your branch because OCDs
  161.  
  162. $ git checkout master
  163. $ git pull
  164.  
  165.  
  166. ################################################
  167.  
  168. ~frappe
  169. (frappE) ➜ frappe git:(develop) git remote -v
  170. upstream https://github.com/frappe/frappe.git (fetch)
  171. upstream https://github.com/frappe/frappe.git (push)
  172. (frappE) ➜ frappe git:(develop) git remote add origin https://github.com/codingCoffee/frappe
  173. (frappE) ➜ frappe git:(develop) bench start
  174. 2017-06-19 18:01:59 [17675] [ERROR] Procfile does not exist or is not a file
  175. (frappE) ➜ frappe git:(develop) git remote -v
  176. origin https://github.com/codingCoffee/frappe (fetch)
  177. origin https://github.com/codingCoffee/frappe (push)
  178. upstream https://github.com/frappe/frappe.git (fetch)
  179. upstream https://github.com/frappe/frappe.git (push)
  180. (frappE) ➜ frappe git:(develop) git fetch
  181. git pull
  182.  
  183.  
  184. ~frappe-bench
  185. bench setup requirements
  186. # Dont ever use 'bench use' so delete eveything from sites/currentsite.txt
  187. subl sites/currentsite.txt
  188. # To run ui tests on the site
  189. bench --site site1.local run-ui-tests
  190. # To update the database schema whenever you pull updates
  191. bench --site site1.local migrate #(or you could use `$ bench update`, it'll do it for all the sites)
  192.  
  193.  
  194. ## Add this to /etc/hosts to access sites using the {sitename} instead of localhost
  195. $ sudo subl /etc/hosts
  196.  
  197. 127.0.0.1 site1.local
  198. 127.0.0.1 library
  199.  
  200.  
  201.  
  202.  
  203. ========================================================================================
  204. ERPNext conference website
  205. ========================================================================================
  206.  
  207. get-app erpnext_conference https://github.com/codingCoffee/erpnext_conference.git
  208. bench new-site erpnext_conf_site
  209. bench --site erpnext_conf_site install-app erpnext_conference
  210.  
  211.  
  212.  
  213.  
  214. ------------------------------------------------------------------------------------------
  215. Date: 3rd July, 2017
  216. Reason: When bench migrate doesn't work
  217.  
  218. coding_coffee@ubuntu-demigod-von-L:/media/coding_coffee/sd5/Frappe/frappe-bench/apps/frappe (branch: develop)
  219. $ git checkout develop
  220. $ git pull
  221. $ git pull upstream develop
  222.  
  223.  
  224. coding_coffee@ubuntu-demigod-von-L:/media/coding_coffee/sd5/Frappe/frappe-bench/apps/erpnext (branch: develop!)
  225. $ git checkout develop
  226. $ git pull
  227.  
  228. coding_coffee@ubuntu-demigod-von-L:/media/coding_coffee/sd5/Frappe/frappe-bench
  229. $ bench --site site1.local reinstall
  230.  
  231. In Google Chrome browser
  232. - Ctrl + Shift + C
  233. - F1
  234. - disable cache while devTools is running
  235.  
  236. ------------------------------------------------------------------------------------------
  237.  
  238.  
  239. $ git add .
  240. $ git status
  241. $ git reset HEAD frappe/tests/ui/test_global_search.js.ignore
  242. $ git status
  243. $ git commit -m "refactored test_desktop, added test_calendarView, added custom functions to test_lib"
  244. $ git checkout develop
  245. $ git pull --rebase upstream develop
  246. $ git checkout UI_testing_desktop
  247. $ git log
  248. $ git push origin UI_testing_desktop:develop
  249. ------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement