Skip to content

Instantly share code, notes, and snippets.

Anatoly Bubenkov bubenkoff

Block or report user

Report or block bubenkoff

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
@bubenkoff
bubenkoff / gist:96e04fb219ff9edcd4f62b43b44a5c94
Last active Jun 27, 2016
Force elastic beanstalk cron job to run
View gist:96e04fb219ff9edcd4f62b43b44a5c94
aws sqs send-message --queue-url=<queue url> --message-body='elasticbeanstalk scheduled job' --message-attributes '{"beanstalk.sqsd.path": {"DataType": "String", "StringValue": "<task url>"}, "beanstalk.sqsd.scheduled_time": {"DataType": "String", "StringValue": "2001-02-03T00:00:00+00:00"}}'
@bubenkoff
bubenkoff / download_sentry_data.py
Created Apr 22, 2016
Download all sentry events for a project. Useful for data processing
View download_sentry_data.py
"""Download sentry data.
usage:
python download_sentry_data.py <org>/<project> <api_key>
"""
import requests
import csv
@bubenkoff
bubenkoff / README.md
Last active Jun 25, 2018 — forked from wjlroe/README.md
JSON API -> CSV
View README.md

Howto download a JSON API array and spit out a CSV

Tools needed

  • httpie -- easy_install httpie (probably you want to sudo easy_install httpie
  • this script -- curl -o /usr/local/bin/json-to-csv.py https://raw.github.com/gist/4119347/24adb5dcd9c025c272042653a70d25b73b485958/json-to-csv.py
  • make that executable -- chmod +x /usr/local/bin/json-to-csv.py

Here we go

@bubenkoff
bubenkoff / django_settings.py
Created Jun 3, 2014
Utility script which switches the django settings module. Usage: setup_django_settings('myproject.settings')
View django_settings.py
import os
import sys
from django.utils.importlib import import_module
from django.core.urlresolvers import clear_url_caches
from django.template import context, base, loader
from django.utils import translation
from django.utils.translation import trans_real
@bubenkoff
bubenkoff / gist:5764377
Created Jun 12, 2013
Run pytest with buildout in xdist mode (pytest-xdist)
View gist:5764377
buildout.cfg:
[py]
recipe = zc.recipe.egg
...
interpreter = py
initialization =
try:
sys.argv.remove('-u')
except ValueError:
View .jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
View Flake8Lint.sublime-settings
{
// run flake8 lint on file saving
"lint_on_save": true,
// popup a dialog of detected conditions?
"popup": true,
// highlight detected conditions?
"highlight": true,
@bubenkoff
bubenkoff / checkpoint.sh
Created Nov 9, 2012
Endpoint Security VPN FULL start/stop script for Mac OS X
View checkpoint.sh
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
# Usage: checkpoint.sh load|unload
# You will need sudo power, of course
#
if [ $1 == "unload" ]
You can’t perform that action at this time.