Skip to content

Instantly share code, notes, and snippets.

View pbanaszkiewicz's full-sized avatar

Piotr Banaszkiewicz pbanaszkiewicz

View GitHub Profile
@pbanaszkiewicz
pbanaszkiewicz / Preferences.sublime-settings
Last active December 27, 2021 16:53
Sublime Text 3 configuration
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_style": "solid",
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
"draw_minimap_border": true,
"enable_telemetry": false,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[

Docs changes

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

Warnings

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

@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.
"""
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 / 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>
@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 / os.sh
Last active December 21, 2015 21:29
Detect Linux operating system distribution, it's version and architecture (only Ubuntu, Debian and CentOS).
lsb_release='/usr/bin/lsb_release'
architecture=`uname -i`
os='unknown'
if [ -x $lsb_release ]; then
# we pull in default values, should work for both Debian and Ubuntu
os=`$lsb_release -s -i | tr "[:upper:]" "[:lower:]"`
if [ "$OS" == "centos" ]; then
os_codename=`$lsb_release -s -r | sed -e 's/\..*//'`
@pbanaszkiewicz
pbanaszkiewicz / gist:6346284
Last active December 21, 2015 18:19
GWM GSOC 2013 TODO
  • python setup.py test (is it necessary now if we reject Travis-CI?)
  • getopts in setup.sh
  • using Vagrant to set up & compile wheel dependencies of GWM (at least provide some shell script to do it, Vagrantfiles aren't necessary)
  • installing dependencies & ganeti_webmgr from OSUOSL FTP mirrors
  • --upgrade option for setup.sh (or something clever like recognizing existing virtual environments)
  • GWM tools package & default configuration
@pbanaszkiewicz
pbanaszkiewicz / gist:6317667
Created August 23, 2013 10:07
Helpful resources to learn vim (some in Polish)
@pbanaszkiewicz
pbanaszkiewicz / install.rst
Last active December 21, 2015 00:59
Ganeti Web Manager ``setup.sh`` installation script

Ganeti Web Manager installation

(You can watch the progress here.)

Proposed setup.sh installation script for GWM would:

  1. detect user's operating system (Debian or CentOS)
  2. install system dependencies (Python, python-virtualenv) via user's OS default package managers (apt or yum) [this will require sudo]
  3. create virtual environment in local directory (or in directory specified by user)