Skip to content

Instantly share code, notes, and snippets.

View pbanaszkiewicz's full-sized avatar

Piotr Banaszkiewicz pbanaszkiewicz

View GitHub Profile
@pbanaszkiewicz
pbanaszkiewicz / loading_settings.py
Last active December 23, 2015 04:49
Suggestion of API to make loading settings for GWM work well.
import os
import random
import string
from django.core.exceptions import ImproperlyConfigured
def random_secret(n=20):
"Create randomly selected character sequence."
return "".join(random.sample(string.digits + string.printable, n))
@pbanaszkiewicz
pbanaszkiewicz / reStructuredText.tmLanguage
Created September 27, 2013 17:52
RST Syntax File for Sublime Text -- taken from TextMate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>syntax highlighting for reStructuredText http://docutils.sourceforge.net, based on rst mode from jEdit</string>
<key>fileTypes</key>
<array>
<string>rst</string>
<string>rest</string>
"""
Useful commands:
ssh - start game V
cd - change directory
ls - print directories and files
vim - edit files
cat - to say if the file is normal V
help - list of commands V
unworm - fix contested file V
logout - quit game V
@pbanaszkiewicz
pbanaszkiewicz / gist:7256421
Created October 31, 2013 20:22
Configuration template proposal for GWM

Configuration template for GWM

Problem

As one of its latest steps, setup.sh git-clones ganeti_webmgr-config repository in order to:

  • get this nice configuration file from that repo,
  • copy gwm-manage.py executable script to virtual env's bin directory.

Docs changes

I pulled latest develop, then checked-out enhancement/14949.

Warnings

File dev/vagrant.rst, line 6: change:

class Job(object):
@require_perms("create_vm")
@staticmethod
def create_vm(**data):
pass
# ... somewhere else ...
with permissions(current_user.perms):
job = Job.create_vm()
@pbanaszkiewicz
pbanaszkiewicz / gist:11292070
Created April 25, 2014 14:45
Peer instruction on the Web - an accepted proposal for Mozilla (Google Summer of Code 2014)

Peer instruction on the Web

Abstract

Currently no MOOCs (Massive Open Online Courses) or e-learning systems support a peer instruction method, which has shown some advantages over traditional lecture-based learning techniques. In this project I will implement a tool that helps instructors and their students experiment with this teaching method online. The project will mainly leverage `WebRTC`_ technology.

@pbanaszkiewicz
pbanaszkiewicz / linode_config.js
Created June 1, 2014 21:48
Lynckia's Linode configuration file, for use with Peer Instruction (https://github.com/pbanaszkiewicz/peer-instruction)
var config = {}
config.rabbit = {};
config.nuve = {};
config.erizoController = {};
config.cloudProvider = {};
config.erizo = {};
config.rabbit.host = 'localhost';
config.rabbit.port = 5672;
@pbanaszkiewicz
pbanaszkiewicz / gist:2517d29e9ff0c9a0f744
Created August 15, 2014 21:29
Sublime User preferences
{
"always_show_minimap_viewport": true,
"auto_indent": true,
"bold_folder_labels": true,
"close_windows_when_empty": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_indentation": true,
"draw_minimap_border": true,
"enable_telemetry": false,
"folder_exclude_patterns":
{% extends "workshops/_page.html" %}
{% block content %}
<h2>Instructors</h2>
{% if instructors %}
<p><span class="glyphicon glyphicon-envelope"></span> = mail instructor about problem</p>
<p><span class="glyphicon glyphicon-remove"></span> = no email address available</p>
<table class="table table-striped">
<tr>
<th>Instructor</th>