Skip to content

Instantly share code, notes, and snippets.

View kklimonda's full-sized avatar

Krzysztof Klimonda kklimonda

View GitHub Profile
@kklimonda
kklimonda / pybrowser.py
Created March 28, 2011 15:18
A minimal Gtk+/Webkit based browser in Python
import sys
from gi.repository import Gtk, Gdk, WebKit
class BrowserTab(Gtk.VBox):
def __init__(self, *args, **kwargs):
super(BrowserTab, self).__init__(*args, **kwargs)
go_button = Gtk.Button("go to...")
go_button.connect("clicked", self._load_url)
self.url_bar = Gtk.Entry()
### Keybase proof
I hereby claim:
* I am kklimonda on github.
* I am kklimonda (https://keybase.io/kklimonda) on keybase.
* I have a public key ASAwwn293lQ9yQOsadtBMDLH0qkX1DH-aNiKJHc51lKQOQo
To claim this, I am signing this object:
@kklimonda
kklimonda / django_test_manage.py
Last active April 26, 2018 10:07
A custom django_test_manage.py for PyCharm 2.7 that adds support for running Django tests for projects that use Buildout. Two things had to be done. First, python egg paths from the buildout script have to be added. Some AST magic does that. Second, the working directory gets mangled because "manage.py" script resides in <<project root>>/bin, so…
#!/usr/bin/env python
import os
def _inject_buildout_modules(buildout_script):
import sys
import ast
with open(buildout_script, 'r') as fh:
content = fh.read()
provider openstack {
user_name = "[user]"
domain_name = "Users"
tenant_name = "[tenant]"
password = "[password]"
auth_url = "https://stack.intra.codilime.com:5000/v3/"
}
resource "openstack_networking_network_v2" "mgmt_net" {
name = "${var.prefix}mgmt_net"
@kklimonda
kklimonda / changes.md
Last active November 22, 2017 08:30
Review of contrail vnc packaging changes

Contrail VNC Debian Packaging Changes

Initial changes to the Contrail VNC packaging for Debian to modernize it and make it a bit more manageable.

Changes description

Most of the changes outside of debian/rules and debian/control are fairly small - the packaging logic is contained in those two files.

debian/rules and debian/control changes

- hosts: localhost
connection: local
tasks:
- name: Create a list of YAML files to validate
find:
paths: .
patterns: "*.yaml"
recurse: true
register: yaml
changed_when: false
---
- job:
name: job-base
- job:
name: job-base
branches: master
vars:
version: 5.0
---
- job:
name: test-job
vars:
test_variable: "{{ ansible_env.HOME }}/test-path"
---
- hosts: all
vars:
test_variable: "{{ ansible_env.HOME }}/test-path"
CONTROLLER_PATCHSETS="
34917
34918
34919
34920
34924
34986
35098
"
BUILD_PATCHSETS="
@kklimonda
kklimonda / buildinfo.cc
Created August 11, 2017 14:52
contrail autogenerated build information
/*
* Autogenerated file. DO NOT EDIT.
*/
#include "buildinfo.h"
const std::string BuildInfo = "{\"build-info\": [{\"build-time\": \"2017-08-11 06:05:27.301890\", \"build-hostname\": \"grown-marten\", \"build-user\": \"ubuntu\", \"build-version\": \"4.1.0.0\"}]}";