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
sudo apt-get install curl | |
curl -sL https://deb.nodesource.com/setup_0.10 | sudo bash - | |
sudo apt-get install -y nodejs | |
sudo npm install -g npm (to update npm) | |
ln -s /usr/bin/nodejs /usr/bin/node | |
sudo npm install -g less less-plugin-clean-css | |
* Complete uninstall of nodejs and npm | |
DO: apt-get autoremove --purge nodejs npm |
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
import xmlrpclib | |
HOST = 'localhost' | |
PORT = 8069 | |
DB = 'DATABASE_NAME' | |
USER = 'admin' | |
PASS = 'admin' | |
ROOT = 'http://%s:%d/xmlrpc/' % (HOST,PORT) | |
# 1. Login | |
uid = xmlrpclib.ServerProxy(ROOT + 'common').login(DB,USER,PASS) |
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
https://help.ubuntu.com/community/PostgreSQL | |
http://stackoverflow.com/questions/24917832/how-connect-postgres-to-localhost-server-using-pgadmin-on-ubuntu | |
Postgres | |
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04 | |
sudo apt update | |
sudo apt install postgresql postgresql-contrib | |
sudo su postgres -c psql |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<metea charset="utf8"> | |
<title></title> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.js"></script> | |
<script type="text/javascript"> | |
function readURL(input) { | |
if (input.files && input.files[0]) { |
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
sudo add-apt-repository ppa:maxmind/ppa | |
sudo apt update | |
sudo apt install libgeoip1 libgeoip-dev geoip-bin | |
sudo pip3 install GeoIP # For Python 3 | |
sudo apt-get install geoip-database-contrib | |
================================================== | |
import GeoIP | |
geofile = config.get('geoip_database') | |
gio_data = GeoIP.open(geofile, GeoIP.GEOIP_STANDARD).record_by_addr(ip) | |
return gio_data |
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
# -*- coding: utf-8 -*- | |
# Copyright <YEAR(S)> <AUTHOR(S)> | |
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | |
{ | |
"name": "Module name", | |
"summary": "Module summary", | |
"version": "11.0.1.0.0", | |
"development_status": "Alpha|Beta|Production/Stable|Mature", | |
"category": "Uncategorized", | |
"website": "https://github.com", |
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
REF LINK: https://www.odoo.com/forum/help-1/question/odoo10-how-to-inherit-templates-of-web-module-119140#answer-119142 | |
This is main template: | |
<template id="template" xml:space="preserve"> | |
<t t-name="DemoExample"> | |
<div class="demo-one"> | |
<p>odoo</p> | |
</div> | |
</t> |
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 | |
# backup Location | |
dir="/home/dell/" | |
# Name of the backup files | |
date=`date +%d-%m-%Y` | |
databases=`psql -l -t | cut -d'|' -f1 | sed -e 's/ //g' -e '/^$/d'` |
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
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python |
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
from turtle import * | |
import time | |
color('orange') | |
begin_fill() | |
pensize(5) | |
left(50) | |
forward(133) | |
circle(50, 200) | |
right(140) | |
circle(50, 200) |
OlderNewer