Skip to content

Instantly share code, notes, and snippets.

Andrew Zakordonets azakordonets

Block or report user

Report or block azakordonets

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
azakordonets / ghostImageAlignment.html
Created Apr 15, 2014
Some code for image alignment in ghost blog editor
View ghostImageAlignment.html
<!--To center an image-->
<p align="center">
<!--To right align an image-->
<p align="right">
View iban.json
"values": [
"country": "Albania",
"length": "28",
"code": "AL",
"format": "AL2!n8!n16!c"
"country": "Andorra",
azakordonets /
Created Sep 1, 2013
Python simple HTTP Server that get's two variables for launch - port and time delay( time after which server will return response) . If we do not specify this two values, then server starts on 8000 port with delay = 0
#!/usr/bin/env python
import SimpleHTTPServer, BaseHTTPServer, SocketServer, socket, time, sys
class ThreadedHTTPServer(SocketServer.ThreadingMixIn,
BaseHTTPServer.HTTPServer) :
New features w/r to BaseHTTPServer.HTTPServer:
- serves multiple requests simultaneously
- catches socket.timeout and socket.error exceptions (raised from
azakordonets /
Created Aug 20, 2019
Substring string in the piped command from command line
echo "1234567890" | cut -b 1-6
azakordonets /
Created Aug 20, 2019
Substring string in the piped command from command line
echo "1234567890" | cut -b 1-6
azakordonets / dummyXCUITest.swift
Created Apr 25, 2018
This is an example of how to use XCTContext.runActivity method in page object patter for XCUITest. This allows to get nice reports with Allure in the future.
View dummyXCUITest.swift
class LoginPage {
func login(with userName: String, and password: String): SomeOtherPage {
return XCTContext.runActivity("Login as existing user") {
this.enter(userName: userName)
this.enter(password: password)
return new SomeOtherPage(app:;
azakordonets / Dockerfile
Created Jul 23, 2019
Standalone Pact running in alpine Docker image
View Dockerfile
FROM alpine:3.9
RUN apk --no-cache add ca-certificates wget bash \
&& wget -q -O /etc/apk/keys/ \
&& wget \
&& apk add glibc-2.29-r0.apk
RUN wget \
&& tar xzf pact-1.69.0-linux-x86_64.tar.gz \
&& rm -rf pact-1.69.0-linux-x86_64.tar.gz
azakordonets / encryptPassWordWithCryptoJs.js
Last active Jul 23, 2019
This gist describes how to encode password with salt using SHA256 algorithm. It shows how to do it with google crypto-js library and Node.js module crypto
View encryptPassWordWithCryptoJs.js
var CryptoJS = require('crypto-js');
var algo = CryptoJS.algo.SHA256.create();
algo.update(password, 'utf-8');
algo.update(CryptoJS.SHA256(salt), 'utf-8');
var hash = algo.finalize().toString(CryptoJS.enc.Base64);
azakordonets /
Last active Nov 25, 2018
This class is designed to convert ResultSet data taken as a result of Db query into JSON. Also additional coverter methods are available
import org.json.JSONArray;
import org.json.JSONObject;
import java.sql.ResultSet;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Locale;
* Utility for converting ResultSets into some Output formats
View run_es6_code_in_sublime.js
"cmd": ["babel-node", "$file"],
"selector": "source.js",
"path": "/usr/local/bin:$PATH", // ENV setting for mac users
"quiet": true // get rid of annoying `[Finished in %fs]`
You can’t perform that action at this time.