Skip to content

Instantly share code, notes, and snippets.

Igor Katson ikatson

Block or report user

Report or block ikatson

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
@ikatson
ikatson / .gitignore
Created Feb 16, 2019 — forked from ArthurHlt/gen-custom.sh
Generate json schema for intellij terraform plugin on a community provider
View Experimental_Generation_of_Interpersonal_Closeness.md

Experimental Generation of Interpersonal Closeness

Instructions to Subjects Included With Task Slips Packet

This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.

In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.

You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should

@ikatson
ikatson / .gitignore
Last active Aug 29, 2015
uwsgi Websocket error: ASYNC call without async mode !!!, IOError: unable to fd to the event queue
@ikatson
ikatson / fswatch_propagate_pwd_changes_to_docker.sh
Created Oct 16, 2014
fswatch_propagate_pwd_changes_to_docker
View fswatch_propagate_pwd_changes_to_docker.sh
function fswatch_propagate_pwd_changes_to_docker () {
echo "Starting fswatch on $PWD"
# tracking previous not to get into endless loop of changing the same file
local previous=''
fswatch -r "$PWD" | while read file; do
if [[ previous != "$file" ]]; then
docker run --rm -v "$PWD":"$PWD" busybox touch -c "$file"
fi
previous="$file"
done
@ikatson
ikatson / check_url.py
Last active Aug 29, 2015
check that a site works, but do not fail from the first attempt
View check_url.py
#!/usr/bin/env python
import argparse
import hashlib
import os
import traceback
import urllib2
import sys
def try_url(url, retries=1):
@ikatson
ikatson / gist:0d586999cf102b10a167
Created Jul 13, 2014
Find all non-automatic migrations
View gist:0d586999cf102b10a167
find . | grep 'migrations.*py$' | grep -v '__init__' | while read file; do grep -E 'Adding|Deleting|Changing' "$file" > /dev/null || echo "$file"; done
# or just
find . | grep 'migrations.*py$' | grep -v -E '__init__|auto|initial'
@ikatson
ikatson / igorkatson.gpg.key
Created Jul 9, 2014
Igor Katson public GPG key
View igorkatson.gpg.key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)
mQENBE6KUrsBCACtaVx9eUEZ0yTG9xRpVMx8+S94bRcI91I5rrHvrmAsfTXTm62a
tx5DrP4pT/W3jbMdVj7Etp9Ul+uT9JyrTcqsOymoa5PpVTaXbi3OKbDhl+GSChF/
iTeV/8pyokUjcLw+XbITq0Cj92Pgjnul0iro7Ri9mmwTWHiGHL9hKXUlBuBY8FX6
35kwuUrHZ4O3+dg8puRj8UufP/UiPp6N3G3jlV0k7R9qx7HLjEN8EGPOzW0tKcQ7
PRm1L3C24JCCZ+7zF31nP4gGMnnH9/mJtY+qL4c+DX1DBQuzYqcA0KXjhXFOe8WP
GDyMvw6mV+tLXP/SbOaUu6p86tEJHbn5F6GhABEBAAG0I0lnb3IgS2F0c29uIDxp
Z29yLmthdHNvbkBnbWFpbC5jb20+iQE4BBMBAgAiBQJOilK7AhsDBgsJCAcDAgYV
@ikatson
ikatson / gist:21e80a7e0b3e99a78ef6
Last active Aug 29, 2015
fpm install native python packages
View gist:21e80a7e0b3e99a78ef6
# Cython can increase the performance of some packages
apt-get install build-essential cython rubygems python-dev python-pip python-setuptools libpcre3-dev
get install fpm
# Build uwsgi
fpm --verbose -s python -t deb --python-install-bin /usr/bin --name uwsgi \
--architecture amd64 -d libpython2.7 -d libpcre3 -d zlib1g -d libssl1.0.0 -d libxml2 uwsgi
# Build gevent debian package
@ikatson
ikatson / README.md
Last active Aug 29, 2015
uwsgi debian build test
View README.md

Playing with debian packages

  1. Place the original archive into parent directory and rename, in my case to

uwsgi_2.0.5.orig.tar.gz


2. This one will update the changelog, it contains the version.
   ```bash
dch --create -v 2.0.5-1 --package uwsgi
@ikatson
ikatson / index.html
Last active Aug 29, 2015
uwsgi + harakiri + websockets bug
View index.html
<html>
<head>
<script>
var polling = (function () {
var poll_error_timeout = 1;
var default_error_timeout = poll_error_timeout + 0;
var poll_error_max_timeout = 15;
function pollForEventsWebsockets() {
var s = new WebSocket('ws://localhost:8000/ws');
You can’t perform that action at this time.