Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefan Praszalowicz stfp

View GitHub Profile
@stfp
stfp / 01_nested_filtergroups_summary
Last active Jun 18, 2018
There are 13 alert policies w/ nested filterGroups in production
View 01_nested_filtergroups_summary
2009: 6923 6927
5705: 7080 (disabled)
6161: 6439 6440 6441 6442 6443 6444
9701: 7333
24065: 6437
35657: 6492 (disabled)
35813: 6409
$ ch_www -c 'select company_id, id, filters from mn_alert_policy' > allpol
$ python lol.py allpol
@stfp
stfp / lol.py
Created Jun 14, 2018
Alerting policies w/ nested filterGroups in production
View lol.py
ch_www -c 'select company_id, id, filters from mn_alert_policy' > allpol
python lol.py allpol
@stfp
stfp / lol.py
Created Jun 14, 2018
Alerting policies w/ nested filterGroups in production
View lol.py
ch_www -c 'select company_id, id, filters from mn_alert_policy' > allpol
python lol.py allpol
View gist:ec6f17d02101d90b0c0f
### Keybase proof
I hereby claim:
* I am stfp on github.
* I am stfp (https://keybase.io/stfp) on keybase.
* I have a public key whose fingerprint is 99A9 D78D 7C95 D0B4 CDEC 9D9B B403 3B0F AD98 2B4A
To claim this, I am signing this object:
View designer.html
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../google-map/google-map-search.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@stfp
stfp / SelfKiller.java
Created May 19, 2011
Java class to kill the current process using JNA
View SelfKiller.java
/* Requires JNA
* Get jna.jar here: http://java.net/projects/jna/sources/svn/show/trunk/jnalib/dist
*/
import com.sun.jna.Library;
import com.sun.jna.Native;
public class SelfKiller
{
private interface CLibrary extends Library
{
@stfp
stfp / veww.sh
Created Jan 27, 2011
virtualenvwrapperwrapper is like lazy initialization for virtualenvwrapper
View veww.sh
#!/bin/sh
_veww () { source virtualenvwrapper.sh }
workon () { _veww; workon $@ }
mkvirtualenv () { _veww; mkvirtualenv $@ }
complete -o default -o nospace -F _veww workon
@stfp
stfp / install-image-in-lvm.py
Created Jan 8, 2011
installs an open nebula image from the repository to a new lvm volume in each host
View install-image-in-lvm.py
#!/usr/bin/python
import os, sys
import logging
import hashlib
from xmlrpclib import ServerProxy
import xml2obj
ONE_SERVER="http://localhost:2633/RPC2"
ONE_USER="oneadmin"