Skip to content

Instantly share code, notes, and snippets.


Artem Hordynskyi ArtemGordinsky

View GitHub Profile
ArtemGordinsky / get-current-spotify-track-properties
Created May 17, 2015
Get current Spotify track's properties
View get-current-spotify-track-properties
tell application "Spotify"
get player state
get artist of current track
get name of current track
get duration of current track
get popularity of current track
get track number of current track
get spotify url of current track
end tell
ArtemGordinsky /
Created Dec 9, 2015
Install Z-Ray for PHP-FPM
#!/usr/bin/env bash
# download zray
curl -o /tmp/${ZRAY_ARCHIVE_NAME} ${ZRAY_URL}
# extract zray archive
tar xvfz /tmp/${ZRAY_ARCHIVE_NAME} -C /tmp
ArtemGordinsky /
Created Dec 11, 2015
Run Node/NPM in a Docker container
# For example, run "npm install"
docker run -v "$PWD":/usr/src/app -w /usr/src/app node:4 npm install
# This command creates a container (downloading one first if you don't have it locally), runs the command in a current directory and quits the container
# Great Success!
ArtemGordinsky / gist:1e6c17dfd5f60cc3e963
Last active Dec 24, 2015
Run PHP inside Docker inside CodeRunner
View gist:1e6c17dfd5f60cc3e963
// enter this in the "Run Command" field in CodeRunner preferences
eval "$(docker-machine env default)" && docker run --rm php:7.0.1-cli php -r "$(sed 's/^<\?php//' $filename)"
ArtemGordinsky /
Last active Aug 6, 2018
Trigger event with attachments in Python
import base64
import requests
from customerio import CustomerIO
file_content = requests.get(file_url).content
file_base64 = base64.b64encode(file_content)
customer_io = CustomerIO(site_id, api_key)