This file contains hidden or 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 | |
reload(sys) | |
sys.setdefaultencoding("utf8") |
This file contains hidden or 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
$(document).ready(function() { | |
// GETS Store list by compnay identification | |
$.get("/get-store-list/" + $("#company-identity").val() , | |
function (data) { | |
var result = data.Result; | |
$.each(result, function(i, item) { | |
$('#sales-store-list').append($('<option></option>').val(result[i].Id).html(result[i].Name)); |
This file contains hidden or 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
// Get first Date and Last Date of Current month | |
var date = new Date(); | |
var firstDay = new Date(date.getFullYear(), date.getMonth(), 1); | |
var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0); | |
alert(firstDay.toLocaleString()); // 10/1/2014, 12:00:00 AM | |
alert(lastDay.toLocaleString()); // 10/31/2014, 12:00:00 AM | |
This file contains hidden or 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 django.core import serializers | |
def tst (request): | |
test = Tourist.objects.all() | |
data = serializers.serialize("json", test) | |
return HttpResponse(data) |
This file contains hidden or 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 get_hotel_price(id){ | |
$.ajax({ | |
data : { 'id' : id}, | |
type : 'GET', | |
url : '/hotels/price/', | |
success : function(responce){ | |
rs = JSON.parse(responce); | |
$('#id_price').val(rs.price); | |
} |
This file contains hidden or 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 -*- | |
__author__ = 'Beka Tomashvili' | |
from suds.client import Client | |
import json | |
rs_url = "https://services.rs.ge/WayBillService/WayBillService.asmx?WSDL" | |
user = 'vobi:12345678910' | |
password = 'vobi1234' |
This file contains hidden or 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 -*- | |
__author__ = 'Beka Tomashvili' | |
from suds.client import Client | |
nbg_url = "http://nbg.gov.ge/currency.wsdl" | |
def get_currency_description(curr): | |
client = Client(nbg_url) |
This file contains hidden or 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
/* aaData[aiDisplay[i]][9] String was like this and i want to get Integer 6947 */ | |
/*<a href="#"> | |
<button type="button" class="btn btn-outline btn-success btn-xs"> 6947 </button> | |
</a>*/ | |
var cost = aaData[aiDisplay[i]][9].replace(/<a\b[^>]*>/i,""); | |
cost = cost.replace(/<button\b[^>]*>/i,""); | |
cost = cost.replace(/<\/a>/i, ""); | |
cost = cost.replace(/<\/button>/i, ""); |
This file contains hidden or 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
#!/usr/bin/env node | |
var debug = require('debug')('invoice'); | |
var app = require('../app'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var https = require('https'); | |
var http = require('http'); | |
var key = fs.readFileSync('/etc/ssl/private/server.key'); |
This file contains hidden or 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 gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var minifyCss = require('gulp-minify-css'); | |
gulp.task('js', function() { | |
return gulp.src('public/javascripts/*.js') | |
.pipe(uglify()) | |
.pipe(gulp.dest('public/javascripts/min')); | |
}); |
OlderNewer