Skip to content

Instantly share code, notes, and snippets.

View TomasKulhanek's full-sized avatar

Tomas Kulhanek TomasKulhanek

View GitHub Profile
@TomasKulhanek
TomasKulhanek / README.md
Last active October 10, 2016 12:30
Virtuoso unstoppable zombie process on kernel 4.1.x

This is configuration to reproduce unstoppable zombie process in kernel 4 booted from CernVM 3 and CernVM 4. During virtuoso compilation, the server is started and then stopped, however virtuoso server process remains with high cpu utilization, after vm restart, all is ok and virtuoso is installed OK. Seems to be caused by kernel as in older kernel versions the installation went smooth.

Prerequisites:

@TomasKulhanek
TomasKulhanek / pythonwebdesktop.py
Last active January 11, 2022 05:22
Desktop background (linux,windows) as web page using python, webkit and proxy settings
#!/usr/bin/env python
# desktop background as web page using webkit and proxy settings
# https://kmandla.wordpress.com/2010/05/24/the-1-2kb-python-browser-script/
# - proxy support is included in webkit no need of -- http://stackoverflow.com/questions/6915840/python-webkit-with-proxy-support
# http://superuser.com/questions/419195/set-an-html-page-as-the-wallpaper-on-linux
import sys
import gtk
import webkit
import webbrowser
@TomasKulhanek
TomasKulhanek / ScratchController.java
Created February 23, 2017 13:50
Java webdav server demo based on milton.io library.
package eu.westlife;
import io.milton.annotations.ChildrenOf;
import io.milton.annotations.PutChild;
import io.milton.annotations.ResourceController;
import io.milton.annotations.Root;
import io.milton.annotations.Get;
import java.util.ArrayList;
import java.util.List;
@TomasKulhanek
TomasKulhanek / vagrant-clean.sh
Last active April 3, 2020 03:21 — forked from jdowning/vagrant-clean.sh
Script to clean up RHEL based (Centos, Fedora,Scientific Linux) Vagrant box before packaging
#!/bin/bash
# This script zeroes out any space not needed for packaging a new RHEL based Vagrant base box.
# It is modified version of https://gist.github.com/justindowning/5670884
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.githubusercontent.com/TomasKulhanek/fb3554f1265fb9b9fc71310a2678a0bc/raw/vagrant-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
@TomasKulhanek
TomasKulhanek / README.md
Last active March 13, 2022 11:29
Python sample to download or upload into WEBDAV capable URL without authentication. Use West-Life Virtual Folder File picker or Upload-Dir picker component to generate temporary WEBDAV url for your account.

Description

Python sample to download or upload into WEBDAV capable URL without authentication. Use West-Life Virtual Folder File picker or Upload-Dir picker component to generate temporary WEBDAV url for your account.

Usage

testwebdav.py [PUT] [webdav url to dir] [filename]

Examples

python testwebdav.py https://portal.west-life.eu/webdav/1234 README.md
@TomasKulhanek
TomasKulhanek / README.md
Last active November 7, 2017 13:29
BASH sample to download or upload into WEBDAV capable URL without authentication.

Description

BASH sample to download or upload into WEBDAV capable URL without authentication. Use West-Life Virtual Folder File picker or Upload-Dir picker component to generate temporary WEBDAV url for your account.

Usage

testwebdav.sh [PUT] [webdav url to dir]/[filename] [data]

Examples

testwebdav.sh https://portal.west-life.eu/webdav/1234/README.md
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Container, inject } from 'aurelia-dependency-injection';
import { Web } from './hosts/web';
import { DesignProcessor } from './designs/design-processor';
let AureliaUX = class AureliaUX {
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Container, inject } from 'aurelia-dependency-injection';
import { Web } from './hosts/web';
import { DesignProcessor } from './designs/design-processor';
let AureliaUX = class AureliaUX {
@TomasKulhanek
TomasKulhanek / testvfpy2.py
Last active March 20, 2018 10:34
test connection to virtual folder from python
# 1. obtain URL of VF directory manually using https://portal.west-life.eu/virtualfolder/filepicker.html - using "Open Upload Dir picker ...."
# 2. copy & paste URL of selected dir into the call of: urllib2.urlopen()
# 3. call this code using python2 - e.g. python testvfpy2.py
# it should report something like
# 200
# Server: nginx
# ...
# <!DOCTYPE HTML PUBLIC ....
import urllib2
@TomasKulhanek
TomasKulhanek / README.md
Last active September 15, 2022 11:07
Script to prepare SL7 vagrant box, full instruction including manual steps are documented at https://h2020-westlife-eu.gitbook.io/virtual-folder-docs/virtual-machines/preparing-vagrant-vm-template

Preparing vagrant VM template

The following section describes how to prepare VM template from scratch, e.g. to be used as base vagrant box or as a base VM template. It's not needed to perform these steps when installing any products, however, might be usefull to maintain version of base OS.

Scientific Linux 7

Download ISO

As a base for most VM templates, Scientific Linux is used. Download the latest version from http://ftp1.scientificlinux.org/linux/scientific/7x/x86_64/iso/