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(
@esseti
esseti / Timer
Created Jan 14, 2016
TimerApp script to set slack "Do Not Disturb" during a pomodor and rest when finished.
View Timer
#replace xoxp-*****000 with your token from here https://api.slack.com/web#authentication
# for the start
do shell script "curl 'https://slack.com/api/dnd.setSnooze?token=xoxp-*****000&num_minutes=$duration'"
# for the end and interuption
do shell script "curl https://slack.com/api/dnd.endSnooze?token=xoxp-*****000"
@j3j5
j3j5 / gist:8b3e48ccad746b90a54a
Last active Jan 27, 2020
Adyen Test Card Numbers
View gist:8b3e48ccad746b90a54a
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373
@katio
katio / resig-netflix-inheritance.js
Last active Apr 23, 2018
From @dylanthehuman's article: (http://techblog.netflix.com/2014/05/improving-performance-of-our-javascript.html) about Netflix's improved version of John Resig's "simple-javascript-inheritance" (http://ejohn.org/blog/simple-javascript-inheritance/)
View resig-netflix-inheritance.js
/* Simple JavaScript Inheritance with NFE's
* MIT Licensed.
*/
// Inspired by base2 and Prototype and John Resig's class system
(function(){
var initializing = false;
// The base Class implementation (does nothing)
this.Class = function(){};
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active Jan 28, 2020
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@johntyree
johntyree / getBlockLists.sh
Last active Jan 25, 2020
Make one large blocklist from the bluetack lists on iblocklist.com
View getBlockLists.sh
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@codiez
codiez / itunes_notifications.py
Created Dec 20, 2009
Listen for distributed notifications from iTunes of the current song
View itunes_notifications.py
'''
This python script listens for distributed notifications from iTunes of new songs playing,
works alot better then constantly polling.
'''
import Foundation
from AppKit import *
from PyObjCTools import AppHelper
class GetSongs(NSObject):
def getMySongs_(self, song):
@peterc
peterc / urlmonitor
Created Apr 4, 2009
urlmonitor - print out the URLs requested system wide on the main network interface
View urlmonitor
# urlmonitor - print out the URLs requested system wide on the main network interface
# Accept a network interface name as an optional argument
iface = ARGV.first
# No interface specified? Try to guess which one is king..
unless iface
`ifconfig -l`.split.each do |iface|
next if iface =~ /^lo/
break if `ifconfig #{iface}` =~ /inet (0|1|2)/
You can’t perform that action at this time.