Skip to content

Instantly share code, notes, and snippets.

View Eugeny's full-sized avatar

Eugene Eugeny

View GitHub Profile
def refresh(self):
self.binder.reset()
# update the dropdown here
self.binder.autodiscover().populate()
@Eugeny
Eugeny / main.py
Last active December 27, 2015 11:39
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'
import os
import re
import time
import subprocess
import ajenti
from ajenti.api import *
from ajenti.api.http import *
from ajenti.plugins import manager
r=function(a,b){$('input,textarea').each(function(i,e){ $(e).val( $(e).val().replace(new RegExp(a, 'g'), b) ); });}; r('Lime', 'Black')
$ tar xvf se-ajenti-0.1.tar.gz
/root/DO.NOT.HACK.PLS.txt
$
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
cert = /etc/ajenti/ajenti.pem
foreground = yes
pid =
[default]
accept = 0.0.0.0:8000
connect = 127.0.0.1:8001
eugeny@eugeny-thinkpad ~> ssh ajenti.org df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 9.4G 4.1G 4.9G 46% /
eugeny@eugeny-thinkpad ~> ssh instacod.es df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 4.5G 3.7G 647M 86% /
/dev/xvdb1 40G 18G 20G 47% /data
<directory>
<name>00E7</name>
<readonly>false</readonly>
<creationtime>2013-04-24T15:28:13.530109633Z</creationtime>
<changetime>2013-04-24T15:31:52.019919454Z</changetime>
<modifytime>2013-04-24T15:31:52.019919454Z</modifytime>
<accesstime>2013-04-24T15:28:13.530109633Z</accesstime>
<backuptime>2013-04-24T15:28:13.530109633Z</backuptime>
<fileuid>7075</fileuid>
<contents>
eugeny@eugeny-thinkpad ~/tmp/b> find ..
..
../a
../a/__init__.py
../a/__init__.pyc
../b
../b/__init__.pyc
../b/script.py
../p.pyc
eugeny@eugeny-thinkpad ~/tmp/b> find .. | grep -v pyc