This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#date: 20/02/2017 | |
#this script will install basic server package,php,composer,mysql,webserver etc | |
#this script has code for install both php 5 and 7 but default is 5 | |
#this script has code for install both nginx and apache2 but default is apache2 | |
#check if script run by Mr.Root :P | |
set -eu | |
if [ "$(id -u)" != "0" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################ | |
# Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14.04 (could be used for other version too) | |
# Author: Yenthe Van Ginneken | |
#------------------------------------------------------------------------------- | |
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances | |
# in one Ubuntu because of the different xmlrpc_ports | |
#------------------------------------------------------------------------------- | |
# Make a new file: | |
# sudo nano odoo-install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1st Level | |
Normal Mode: | |
i → Insert mode. Type ESC to return to Normal Mode | |
x → Delete the char under the cursor | |
:wq → Save & quit (:w save, :q quit) | |
dd → Delete (and Copy) the current line | |
P → Paste | |
hjkl → Basic cursor mode (←↓↑→) | |
:help <command> to get general help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Open terminal via Ctrl+Alt+T & run command to install the Key: | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
2. Then add the apt repository via command: | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
3. Finally check updates and install sublime-text by running commands on terminal | |
sudo apt update && sudo apt install -y sublime-text | |
Uninstall Sublime Text: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setp-1: Update & Upgrade Source List | |
update apt source list | |
sudo apt-get upgrade | |
Step-2: Install python dependencies for Odoo | |
sudo apt-get install python-dateutil python-docutils python-feedparser python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi poppler-utils python-pip python-pypdf python-passlib python-decorator gcc python-dev mc bzr python-setuptools python-markupsafe python-reportlab-accel python-zsi python-yaml python-argparse python-openssl python-egenix-mxdatetime python-usb python-serial lptools make python-pydot python-psutil python-paramiko poppler-utils python-pdftools antiword python-requests python-xlsxwriter python-suds python-psycogreen python-ofxparse python-gevent | |
Step-3: Odoo Web dependencies | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add CodeLite Public Key | |
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc | |
# Add repository to /etc/apt/sources.list | |
deb http://repos.codelite.org/wx3.1.0/ubuntu/ xenial universe | |
# Update system | |
sudo apt-get update | |
# Install packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var landscape = function() { | |
var result = ""; | |
var flat = function(size){ | |
for (i=0; i<size; i++) | |
result += "_"; | |
} | |
var mountain = function(size){ | |
result += "/" | |
for (i=0; i<size; i++) | |
result += "'"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function power(base, exponent){ | |
if (exponent == 0) | |
return 1; | |
else | |
return base * power(base, exponent-1); | |
} | |
console.log(power(5, 6)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findSolution(target) { | |
function find(current, history){ | |
if (current == target) | |
return history; | |
else if (current > target) | |
return null; | |
else | |
return find(current + 5, "(" + history + " + 5)") || | |
find(current * 3, "(" + history + " * 3)"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Your code here. | |
function isEven(number){ | |
while (number > 0 || number < 0) | |
if (number > 0 && (isEven(number - 1) == 0)) | |
return true; | |
else if(number < 0 && (isEven(number + 1) == 0)) | |
return true; | |
else | |
return false; | |
} |
OlderNewer