Skip to content

Instantly share code, notes, and snippets.

Artem Gordinsky ArtemGordinsky

Block or report user

Report or block ArtemGordinsky

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
@ArtemGordinsky
ArtemGordinsky / trigger_customer_io_event_with_attachments.py
Last active Aug 6, 2018
Trigger Customer.io event with attachments in Python
View trigger_customer_io_event_with_attachments.py
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)
customer_io.track(
@ArtemGordinsky
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
ArtemGordinsky / node-npm-in-docker.sh
Created Dec 11, 2015
Run Node/NPM in a Docker container
View node-npm-in-docker.sh
# 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
ArtemGordinsky / install-zray.sh
Created Dec 9, 2015
Install Z-Ray for PHP-FPM
View install-zray.sh
#!/usr/bin/env bash
ZRAY_URL="http://repos.zend.com/zend-server/early-access/zray-tech-preview/zray-php-102775-php5.6.15-linux-debian7-amd64.tar.gz"
ZRAY_ARCHIVE_NAME="zray.tar.gz"
ZRAY_PACKAGE_NAME="zray-php-102775-php5.6.15-linux-debian7-amd64"
# download zray
curl -o /tmp/${ZRAY_ARCHIVE_NAME} ${ZRAY_URL}
# extract zray archive
tar xvfz /tmp/${ZRAY_ARCHIVE_NAME} -C /tmp
@ArtemGordinsky
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
You can’t perform that action at this time.