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/sh | |
# Install OpenERP 7 on Digital Ocean | |
# Fernando Altuzar | |
# Modified script from Carlos E. Fonseca Zorrilla & Mario Gielissen | |
# First: Create a Droplet with CentOS 32 bits | |
# Then: | |
yum -y install wget unzip | |
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
rpm -ivh http://yum.pgrpms.org/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-6.noarch.rpm |
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
# copied only the scripts from http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/ | |
sudo apt-get install openssh-server denyhosts | |
sudo apt-get update | |
sudo apt-get dist-upgrade | |
sudo adduser --system --home=/opt/openerp --group openerp | |
sudo apt-get install postgresql | |
sudo su - postgres | |
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp | |
#Enter password for new role: ******** |
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
# | |
# /etc/apache2/sites-available/openerp | |
# | |
# OpenERP Reverse Proxy Configuration for Apache 2. | |
# | |
# Authors: 2014 Mariano Ruiz <[email protected]> | |
# | |
# After copy this file execute: | |
# | |
# sudo a2ensite openerp |
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 sys | |
n = int(raw_input("Enter the Counter number : ")) | |
for i in range(1,n): | |
if( i% 15 == 0): | |
print "fizzbuzz" | |
elif (i%3 == 0): | |
print "fizz" | |
elif (i%5 == 0): | |
print "buzz" | |
else: |
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
<?php | |
define('MAILGUN_URL', 'https://api.mailgun.net/v3/DOMAIN_NAME'); | |
define('MAILGUN_KEY', 'KEY'); | |
function sendmailbymailgun($to,$toname,$mailfromnane,$mailfrom,$subject,$html,$text,$tag,$replyto){ | |
$array_data = array( | |
'from'=> $mailfromname .'<'.$mailfrom.'>', | |
'to'=>$toname.'<'.$to.'>', | |
'subject'=>$subject, | |
'html'=>$html, |
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
<?php | |
$client_id ='1000.GUPPSEH1013UZQA5SN8OAJV1DQU5FM';//Enter your Client ID here | |
$client_secret = '4932018fd429a4246e96d9186e77704d88d05b052a';//Enter your Client Secret here | |
$code = '1000.bf0e3723d718ac74660843a2128946b8.c6a7d9ce01ea879a22803f5f88bb0a6c';//Enter your Code here | |
$base_acc_url = 'https://accounts.zoho.com'; | |
$service_url = 'https://creator.zoho.com'; | |
$refresh_token = '1000.4f4b206a80c5e3e48c1cf3a55994a19c.c7c25dc7144da53c497b2d2ca834d1d0'; //Replce this with your Refresh token | |
$token_url = $base_acc_url . '/oauth/v2/token?grant_type=authorization_code&client_id='. $client_id . '&client_secret='. $client_secret . '&redirect_uri=http://localhost&code=' . $code; |
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 readAndSend() { | |
let url = 'https://www.zoho.com/blog/feed'; | |
let xml = UrlFetchApp.fetch(url).getContentText(); | |
let document = XmlService.parse(xml.trim()); | |
let root = document.getRootElement(); | |
let channel = root.getChild('channel'); | |
let items = channel.getChildren('item'); | |
for(i =0; i< items.length; i++){ | |
let item = items[i]; | |
let pubDateStr = item.getChild('pubDate').getText(); |
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
string String.Amount2Words(float amount) | |
{ | |
//amount.frac() not working for long numbers | |
paise_str = amount.toString().getSuffix("."); | |
if(paise_str != "") | |
{ | |
paise_amount = paise_str.toLong(); | |
paise_str = " and "+ thisapp.String.TwoDigitWords(paise_amount) + " paise"; | |
} | |
rupee_str = String.RupeeInWords(amount.toLong()); |
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
<%{ | |
data_source = {"code":"0","description":"Success","subscriberQuota":{"qtavalue":"500.00","qtabalance":"419.30","qtaconsumption":"80.70","type":"2","refuelingTotal":"0.00","qtaconsumptionTotal":"263.22"},"historyQuota":{{"time":"20220707","qtaconsumption":"19.07","mcc":"714"},{"time":"20220707","qtaconsumption":"236.41","mcc":"710"},{"time":"20220707","qtaconsumption":"7.74","mcc":"708"},{"time":"20220706","qtaconsumption":"164.85","mcc":"714"}},"ext":null}; | |
subscriberQuota = data_source.get("subscriberQuota"); | |
qtaconsumption = subscriberQuota.get("qtaconsumption").toDecimal(); | |
qtavalue = subscriberQuota.get("qtavalue").toDecimal(); | |
percent = ((qtaconsumption / qtavalue).round(4) * 100).round(2); | |
deg_value = percent / 200; | |
%> | |
<div style="margin:10px;display:flex;flex-direction:column;"> | |
<h1 style="text-align:center;">subscriberQuota</h1> |
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
<%{ | |
%> | |
<link | |
href="https://aorborc.github.io/bootstrap5/css/main.min.css" | |
rel="stylesheet" | |
crossorigin="anonymous" | |
/> | |
<link rel="preconnect" href="https://fonts.googleapis.com" /> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | |
<link |
OlderNewer