Put prompt.sh in "/etc/profile.d" or any other place suitable for the target system to have it load when a user logs in.
In case the target system does not have a /etc/profile.d you can create it:
mkdir /etc/profile.d
#!/usr/bin/python | |
"""Quick and dirty mp4 file cutting by cue sheet. | |
The cue sheet shall look somewhat like this:: | |
PERFORMER "Calexico & ORF Radio-Symphonieorchester" | |
TITLE "FM4 Radiosession mit Calexico" | |
FILE "mp4_rs_calexico_final_2_q4a_200152.mp4" MP3 | |
TRACK 01 AUDIO |
#!/usr/bin/env python | |
import socket | |
import struct | |
class ArtNet(object): | |
PORT = 6454 # 0x1936 | |
def __init__(self, port=PORT): | |
self._socket = None |
#!/usr/bin/env perl | |
use IO::Socket::INET; | |
my $sig = 'Art-Net'.pack('x'); | |
my $op = pack('v', 0x5000); | |
my $ver = pack('n', 14); | |
my $seq = pack('x'); | |
my $phy = pack('x'); |
import unittest | |
import inspect | |
class TestLists(unittest.TestCase): | |
def logPoint(self): | |
currentTest = self.id().split('.')[-1] | |
callingFunction = inspect.stack()[1][3] | |
print 'in %s - %s()' % (currentTest, callingFunction) |
def namedtuple_factory(name=None, **kwargs): | |
"""create and use namedtuples in one line""" | |
name = name or 'AnonymousNamedtuple' | |
cls = namedtuple(name, kwargs.keys()) | |
return cls(**kwargs) | |
# sample usage | |
namedtuple_factory('Response', errorcode=500) | |
namedtuple_factory(id=1, name='anon') | |
namedtuple_factory(**{'this_dict': 1, 'is_a': 2, 'named': 'tuple'}) |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'formatters': { | |
'debug': { | |
'format': '%(asctime)s %(levelname)s %(name)s %(funcName)s(%(lineno)d): %(message)s' | |
}, | |
}, | |
'handlers': { |
def queryset_iterator(query, chunk_size=1000): | |
count = 0 | |
total = query.count() | |
while count < total: | |
for row in query[count:count + chunk_size]: | |
count += 1 | |
yield row | |
gc.collect() |
import logging | |
import sys | |
logging.basicConfig( | |
stream=sys.stdout, | |
level=logging.DEBUG, | |
format='%(asctime)s %(levelname)s %(name)s %(funcName)s(%(lineno)d): %(message)s' | |
) |