Skip to content

Instantly share code, notes, and snippets.

@vog3lm
vog3lm / js-dnd-ops.js
Last active April 18, 2018 14:47
html/css/js drag and drop reactions; implemented register/unregister trigger event listener
function DragTagOperator(){
var position = {};
var dispatcher = null;
var args = {'root':'header'};
var events = {
'drag-register':(data) => {this.register(data)}
,'drag-unregister':(data) => {this.unregister(data)}
};
this.decorate = function(opts){
for (var key in opts){
@vog3lm
vog3lm / access.py
Created April 17, 2018 10:26
playstation controller interface; depends on pygame, xboxdrv; listen on button and axis events
import signal, os, sys, psc, logging
# @id ::
# @job ::
# @res ::
class Engine(psc.PscIocJob):
def __init__(self):
psc.PscIocJob.__init__(self)
def execute(self,key,value):
if(psc.PscJobKeys.R1 == key):
if(1 == value):
@vog3lm
vog3lm / StatusIcon.py
Created March 13, 2018 20:09 — forked from pklaus/StatusIcon.py
StatusIcon – A Simple Tray Icon Application Using PyGTK
#!/usr/bin/env python
# found on <http://files.majorsilence.com/rubbish/pygtk-book/pygtk-notebook-html/pygtk-notebook-latest.html#SECTION00430000000000000000>
# simple example of a tray icon application using PyGTK
import gtk
def message(data=None):
"Function to display messages to the user."
@vog3lm
vog3lm / myappindicator_v1.py
Created March 13, 2018 20:04 — forked from candidtim/myappindicator_v1.py
Minimal set-up for an Ubuntu AppIndicator in Python
from gi.repository import Gtk as gtk
from gi.repository import AppIndicator3 as appindicator
APPINDICATOR_ID = 'myappindicator'
def main():
indicator = appindicator.Indicator.new(APPINDICATOR_ID, 'whatever', appindicator.IndicatorCategory.SYSTEM_SERVICES)
indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
indicator.set_menu(gtk.Menu())
gtk.main()
@vog3lm
vog3lm / client.py
Last active January 24, 2018 12:45
paramiko ssh respondable remote shell access
import paramiko
if __name__ == '__main__':
host = 'REMOTE_HOST_IP'
port = 'REMOTE_HOST_PORT' # int()
user = 'USER_LOGIN_NAME'
code = 'USER_LOGIN_PASSWORD'
command = 'pss-shell -c help'