#!/usr/bin/python
import sys
def main():
'''Why does the sys module have "argv" but no "argc"?
http://www.python.org/search/hypermail/ ... /1034.html
If there was a sys.argc, then you would have to remember to
update its value whenever you changed sys.argv.
While this may not be common in C, it's not unusual in Python.
'''
argc = len(sys.argv)
print "number of arguments is: ", argc
if __name__ == '__main__':
main()
[ add comment ] ( 21 views ) | [ 0 trackbacks ] | permalink
>>> import md5
>>> foo = md5.new("hohoho!")
>>> foo.hexdigest()
'14874050f4928b54f58b6d292a681f00'
[ add comment ] ( 10 views ) | [ 0 trackbacks ] | permalink
Allow cgi scripts, then follow the lightsquid documentation.
http://lightsquid.sourceforge.net/
/etc/httpd/conf.d/lightsquid.conf
<Directory "/var/www/html/lightsquid">
DirectoryIndex index.cgi
Options +ExecCGI
AddHandler cgi-script .cgi
AllowOverride All
</Directory>
/etc/httpd/conf/httpd.conf
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi
[ add comment ] ( 10 views ) | [ 0 trackbacks ] | permalink
create cpio archive
find . | cpio -o > archive
extract cpio archive
cpio -id < archive
[ add comment ] ( 9 views ) | [ 0 trackbacks ] | permalink
http://www.usefilm.com/image/1602465.html
[ 2 comments ] ( 32 views ) | [ 0 trackbacks ] | permalink
https://localhost:8000/en-US/app/search/index_status
[ add comment ] ( 14 views ) | [ 0 trackbacks ] | permalink
Splunk regular for extracting fields in format variable='value'
(?i)'(?P<FIELDNAME>[^']+)'
Set the Splunk server to receive compressed data from forwarder on port 50000, file /opt/splunk/etc/system/local/inputs.conf
[default]
host = myserver.mycompany.com
[splunktcp://50000]
compressed = true
Configure Splunk forwarder for routing. In example, the forwarder does different routing for each of two diffferent sourcetypes. First, we define the sources to collect ( /opt/splunk/etc/system/local/inputs.conf ):
[monitor:///var/log/clc/reports/unix/level3/*]
disabled = false
index = first_index
sourcetype = first_sourcetype
[monitor:///var/log/clc/*/notsocoolevents/*]
disabled = false
index = second_index
sourcetype = second_sourcetype
The props.conf in the same directory defines the routing paths specific to sourcetypes:
[first_sourcetype]
TRANSFORMS-routing = routeLocal
[second_sourcetype]
TRANSFORMS-routing = routeOutside
The transforms.conf could be used to filter the events before the routing and defines the destinations (outputs):
[routeLocal]
REGEX=.*
DEST_KEY=_TCP_ROUTING
FORMAT=outsideGroup
[routeOutside]
REGEX=.*
DEST_KEY=_TCP_ROUTING
FORMAT=localGroup
outputs.conf defines the servers we route to:
[tcpout:localGroup]
server = server1.mycompany.com:50000
disabled = false
compressed = true
[tcpout:outsideGroup]
server = server2.othercompany.com:60000
disabled = false
compressed = true
[ add comment ] ( 8 views ) | [ 0 trackbacks ] | permalink
http://ubuntunext810.blogspot.com/2008/ ... ssion.html
http://www.linuxbsdos.com/2010/10/18/gu ... in-ubuntu/
1. Je potreba mit nainstalovany balicek gdm-guest-session (defaultne je nainstalovany)
Popis:
This package adds support for starting a guest session through gdm’s flexiserver, which any already logged in user can launch. It creates a temporary guest account with a temporary home directory and some restricted privileges (such as not being able to read any home directory or do any permanent change to the system). Just call /usr/share/gdm/guest-session/guest-session-launch to start the session.
2. Spustit /usr/share/gdm/guest-session/guest-session-launch
KKiosk Mode
http://jacob.steelsmith.org/category/se ... sk-edition
[ add comment ] ( 27 views ) | [ 0 trackbacks ] | permalink
http://www.fixya.com/support/t372531-mi ... an_dual_iv
1) Install all of the usual Minolta software in Vista.
2) Create a new folder somewhere
3) Create a new txt file named minolta.inf and paste this into it:
; scanners.inf -- Test Vista Minolta Film Drivers
;
;
; To remove this driver and install the original
; manufacturer's driver, go into Device Manager,
; open Imaging devices, then click on the scanner name
; with the right mouse button and choose Uninstall.
[Version]
Signature="$CHICAGO$"
Class=Image
ClassGUID={6bdd1fc6-810f-11d0-bec7-08002be2092f}
Provider=%Provider%
DriverVer=3/12/2009,2.0
[Manufacturer]
%Mfg%=Models,ntamd64
[Models]
; USB scanners
"Minolta Scan Dual II" = USBScanner,USB\Vid_0638&Pid_026a
"Minolta Scan Dual III" = USBScanner,USB\Vid_0686&Pid_400d
"Minolta Scan Dual IV" = USBScanner,USB\Vid_132b&Pid_000a
"Minolta Scan Elite 5400 2" = USBScanner,USB\Vid_132b&Pid_0012
"Minolta Scan Elite 5400" = USBScanner,USB\Vid_0686&Pid_400e
"Minolta Scan Elite II" = USBScanner,USB\Vid_0686&Pid_4004
"Minolta SC-110" = USBScanner,USB\Vid_0638&Pid_0a15
"Minolta SC-215" = USBScanner,USB\Vid_0638&Pid_0a16
;---------------- Duplicated from [Models]
[Models.ntamd64]
; USB scanners
"Minolta Scan Dual II" = USBScanner,USB\Vid_0638&Pid_026a
"Minolta Scan Dual III" = USBScanner,USB\Vid_0686&Pid_400d
"Minolta Scan Dual IV" = USBScanner,USB\Vid_132b&Pid_000a
"Minolta Scan Elite 5400 2" = USBScanner,USB\Vid_132b&Pid_0012
"Minolta Scan Elite 5400" = USBScanner,USB\Vid_0686&Pid_400e
"Minolta Scan Elite II" = USBScanner,USB\Vid_0686&Pid_4004
"Minolta SC-110" = USBScanner,USB\Vid_0638&Pid_0a15
"Minolta SC-215" = USBScanner,USB\Vid_0638&Pid_0a16
;---------------- USBScanner -------------------------
[USBScanner]
Include=sti.inf
Needs=STI.USBSection
SubClass=StillImage
DeviceType=1
DeviceSubType=1
Capabilities=0
[USBScanner.Services]
Include=sti.inf
Needs=STI.USBSection.Services
[Strings]
Provider="Konica Minolta"
Mfg="Konica Minolta"
4. Save file. Turn on scanner and go into device manager and update the old minolta driver with this driver. You may have to manually update it.
5. All the normal Minolta programs now work just fine. Enjoy!
[ add comment ] ( 29 views ) | [ 0 trackbacks ] | permalink
[ add comment ] ( 28 views ) | [ 0 trackbacks ] | permalink