Skip to content

Instantly share code, notes, and snippets.


Alexander Klimenko meteozond

Block or report user

Report or block meteozond

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
edgi / anyconnect_gui.scpt
Last active Nov 6, 2018
Cisco AnyConnect VPN GUI client connection automation (with Keychain)
View anyconnect_gui.scpt
-- 1. Create a new generic password entry in Keychain Access called "WHATEVER_AnyConnect_VPN" (the name in Keychain access must match that in line 39 below) with your password for the Cisco AnyConnect VPN server.
-- 2. Modify values of vpnUrl and keychainKey variables
-- 3. Open this script in Script Editor (both this and the above are in the Applications->Utilities folder) and "Save as.." an Application (.app) with desired name.
-- 4. Open Security & Privacy System Preferences, go to Privacy, Accessibility.
-- 5. Enable the above .app so it can access Accessibility
-- 6. Copy and paste a nice icon on the generic Applescript icon (I used a copy of the default AnyConnect one)
-- 7. Add the new .app to /Users/[yourshortname]/Applications with a shortcut to your Dock
-- 8. Enjoy the fast connection with no need to enter password and increased security of not having a sensitive password stored as plain text
-- 9. Run script again to close connection
View isomorphicish.js
var _ = require('underscore');
var Backbone = require('backbone');
var cheerio = require('cheerio');
var request = require('request');
Backbone.ajax = function(options) {
options.json = true;
return request(options, function(error, result) {
if (error) {
alekstorm /
Last active Jul 10, 2017
Ansible callback plugin that posts events to your Datadog event stream as you deploy


To install, place in your callback plugins directory. If you don't yet have one, run:

mkdir -p plugins/callback

Then place the following in your ansible.cfg file:

callback_plugins = ./plugins/callback
FZambia /
Last active Apr 27, 2019
python in process memory cache based on ordered dictionary - with size limit and timeout support
# coding: utf-8
import time
from collections import OrderedDict
class Cache():
In process memory cache. Not thread safe.
#!/usr/bin/env python
# Copyright 2012 Patrick Hetu <>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
copitux / Doc.rst
Created Sep 24, 2012
Django, Django forms and Django rest framework: Payload validation
View Doc.rst

Django request flow

-------------------------------                         ------------------ Django --------------------
| Browser: GET /udo/contact/2 |    === wsgi/fcgi ===>   | 1. Asks OS for DJANGO_SETTINGS_MODULE      |
-------------------------------                         | 2. Build Request (from wsgi/fcgi callback) |
                                                        | 3. Get settings.ROOT_URLCONF module        |
                                                        | 4. Resolve URL/view from request.path      | # url(r'^udo/contact/(?P<id>\w+)', view, name='url-identifier')
                                                        | 5. Apply request middlewares               | # settings.MIDDLEWARE_CLASSES
atabary /
Created May 26, 2012
MySQL table lock with django
#-*- coding: utf-8 -*-
import contextlib
from django.db import connection
def acquire_table_lock(read, write):
'''Acquire read & write locks on tables.
alassek / extendEach.js
Created Sep 19, 2011
Easy multiple-inheritance in Backbone.js
View extendEach.js
(function () {
function extendEach () {
var args =,
child = this;
_.each(args, function (proto) {
child = child.extend(proto);
# In-memory Cassandra-ish thingy... useful for unit tests. Maybe useful for other
# stuff too? No support for SuperColumns, but that should be easy enough to add.
import bisect
import copy
from cassandra.ttypes import NotFoundException, Column, ColumnPath, ColumnOrSuperColumn
class SSTable(object):
You can’t perform that action at this time.