This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ glslideshow_flags ls -l | |
total 12 | |
lrwxrwxrwx 1 eugene eugene 49 Feb 18 11:20 glslideshow_flags.py -> /usr/share/pyshared/ajenti/plugins/hosts/hosts.py | |
-rw-r--r-- 1 eugene eugene 1967 Feb 18 11:28 glslideshow_flags.pyc | |
lrwxrwxrwx 1 eugene eugene 52 Feb 18 11:20 __init__.py -> /usr/share/pyshared/ajenti/plugins/hosts/__init__.py | |
-rw-r--r-- 1 eugene eugene 570 Feb 18 11:28 __init__.pyc | |
drwxr-xr-x 2 eugene eugene 4096 Feb 18 11:20 layout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Option (object): | |
def __init__(self, value): | |
self.value = value | |
...in plugin: | |
def init(self): | |
.... | |
self.binder = Binder(None, self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ajenti.ui import UIElement | |
print UIElement.get_classes() | |
print sorted(list(set([x.typeid for x in UIElement.get_classes()]))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def refresh(self): | |
self.binder.reset() | |
# update the dropdown here | |
self.binder.autodiscover().populate() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ajenti.api import plugin | |
from ajenti.plugins.main.api import SectionPlugin | |
from ajenti.ui import on, p, UIElement | |
from ajenti.ui.binder import Binder | |
@plugin | |
class Test (SectionPlugin): | |
def init(self): | |
self.title = 'Controls 2' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import time | |
import subprocess | |
import ajenti | |
from ajenti.api import * | |
from ajenti.api.http import * | |
from ajenti.plugins import manager |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r=function(a,b){$('input,textarea').each(function(i,e){ $(e).val( $(e).val().replace(new RegExp(a, 'g'), b) ); });}; r('Lime', 'Black') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tar xvf se-ajenti-0.1.tar.gz | |
/root/DO.NOT.HACK.PLS.txt | |
$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debugging stunnel problems in Ajenti: | |
0. Disable SSL in ajenti: | |
change "ssl": { "enable": true to false in /etc/ajenti/config.json | |
service ajenti restart | |
1. Regenerate the certificate | |
ajenti-ssl-gen hostname -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cert = /etc/ajenti/ajenti.pem | |
foreground = yes | |
pid = | |
[default] | |
accept = 0.0.0.0:8000 | |
connect = 127.0.0.1:8001 |