Skip to content

Instantly share code, notes, and snippets.

View werdan's full-sized avatar

Andriy Samilyak werdan

View GitHub Profile
import platform
import sys
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
def _get_platform():
# On Android sys.platform returns 'linux2', so prefer to check the
# presence of python-for-android environment variables (ANDROID_ARGUMENT
# or ANDROID_PRIVATE).
@werdan
werdan / gist:82cfaf6cc913c5c2131304a79ef6fb4e
Created August 16, 2016 15:09
sed not accepting regexp?
If you think sed is not working properly, just add quotes
echo "123123,1.0000" | sed 's/\([1-9]\).0000/\1/g'
@werdan
werdan / gist:b940ba383c7e6fa8ec46c49557e3f062
Created June 6, 2016 13:15
Order confirmation template
<div style="font-family:Arial,Helvetica,sans-serif;line-height:18px">
<p>Dear Andriy,</p>
<p>Here is a summary of your order on Boodmo.com:</p>
<br>
<p>Sold by: Indian machines and trucks</p>
<table cellspacing="0" width="100%" style="border-collapse:collapse">
<thead>
<tr style="background:#e8e8e8;color:#555">
<th style="padding:8px;text-align:left">S.No</th>
<th style="padding:8px;text-align:left">Item</th>
# trello.com/b/Mumoqgty.json
import json
with open('boodmo.json') as data_file:
data = json.load(data_file)
cards = data['cards']
for card in cards:
if (card['closed'] == False and card['idList'] == '55fa9cb8b9338073afd3dedc'):
print card['name'] + " (" + card['shortUrl'] + ")"
import json
with open('boodmo.json') as data_file:
data = json.load(data_file)
cards = data['cards']
for card in cards:
if (card['closed'] == False and card['idList'] == '55fa9cb8b9338073afd3dedc'):
print card['name'] + " (" + card['shortUrl'] + ")"
EMIJ,235
EMIL,240
EMIN,237
EMIR,234
EMIS,236
EMIT,180
EMIZ,239
EURU,241
EUSA,238
FAST,242
#!/bin/bash
cd /var/www/shared/emex
rm all.csv
rm *.rar
wget ftp://emexonline.com/megaprice/{EMIR,EMIJ,EMIS,EMIN,EMIT,EUSA,EMIZ,EMIL,EURU,FAST,KORA,KOSA,OPTA}.rar
find . -name "*.rar" -exec unrar x -o+ {} \;
# Pre-sorting SKU and Brands mapping
@werdan
werdan / gist:e65dfa4e1608ce502eaf
Created November 16, 2015 10:49
Boodmo Bad Bot List
omniexplorer_bot
yandeximages
Spinn3r
sogou
sosospider+
jikespider
ia_archiver
PaperLiBot
ahrefsbot
SiteBot
@werdan
werdan / gist:585979ee9a3d29fe7697
Created September 25, 2015 11:03
Boodmo widget sample
<script src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" async=""></script><!-- up --> <ins class="adsbygoogle" style="display: block;" data-ad-client="ca-pub-9137939739742558" data-ad-slot="5338326028" data-ad-format="auto"></ins><script>// <![CDATA[
(adsbygoogle = window.adsbygoogle || []).push({});
// ]]></script>
AWS.config.region = 'us-east-1';
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:123123123123123123123',
});
AWS.config.credentials.get(function() {
var syncClient = new AWS.CognitoSyncManager();
syncClient.openOrCreateDataset('myDataset', function(err, dataset) {