Miscellaneous How To
| Miscellaneous |
|---|
| Miscellaneous Topics |
| How To · Troubleshooting |
Contents |
[edit] Design
[edit] How to make a real system look like a mock up
Say you want to do a screen cast and all you have is a functional system, but you do not want to expose any potentially sensitive information. Your solution is to use firefox with a greasemonkey script that replaces questionable content on a displayed page with faked data.
[edit] How to get a high resolution logo of any company
Type the following into google: //company name filetype:pdf site:companysite.com//
Pick several PDF. Open and look for the logos. Zoom in close to check if they are vector and thus don't deteriorate when closely zoomed Make a snapshot of the logo blown up to the take your full screen. You could get it bigger than the screen size if you zoom in more, make multiple snapshots of each segment and then stich back together.
In photoshop crop it to contain the logo only. If you need to make it on a transparent background do a color range selection (works fine at the fuzziness of 40). Delete the selected region. Remove the background layer visibility so it does not show up through the region you just deleted. Remove white matte. Save as PNG to preserve transparency.
[edit] Photo, Audio and Video
[edit] How to resize an image in a script
Here's another script I use to generate the thumbnails:
#!/bin/bash -x INPUT="$1" OUTPUT="$2" TEMPFILE="/tmp/thumnailer$$" nice -n 20 transcode -V -i "${INPUT}" -y jpg,null -o "${TEMPFILE}" -c 2000-2001 mv "${TEMPFILE}000000.jpg" "${OUTPUT}"
[edit] How to convert Videos for mobile devices
Convert your videos using WinFF. Get it here: http://code.google.com/p/winff/wiki/UbuntuInstallation Use these settings: 480x320, 15fps, XVid in AVI. (mplayer4iphone) It's crucial to keep the fps to 15, since 24fps, etc. was jerky for me. Here's my preset for WinFF if you want to create one: -r 15 -vcodec libxvid -vtag XVID -s 480x320 -aspect 4:3 -maxrate 1800k -b 1500k -qmin 3 -qmax 5 -bufsize 4096 -mbd 2 -bf 2 -flags +4mv -trellis 1 -cmp 2 -subcmp 2 -g 300 -acodec libmp3lame -ar 48000 -ab 128k -ac 2
[edit] How to convert MP3 tags to UTF8
sudo apt-get install easytag
or
sudo aptitude install python-mutagen
or
cd <dir> find -iname '*.mp3' -print0 | xargs -0 mid3iconv -eCP1251 --remove-v1
[edit] Backups
[edit] How to read rsync log flags
- First character:
- < - a file is being transferred to the remote (sent).
- > - a file is being transferred to the local (received).
- c - a local change/creation
- h - the item is a hard link
- . - the item is not being updated
- * - the rest is a message
- Second character:
- f - file
- d - directory
- L - symlink
- D - device
- S - special file
- Following letters:
- c - a different checksum
- s - size of a regular file is different
- t - modification time is different and is being updated to the sender's value
- T - that the modification time will be set to the transfer time
- p - permissions are different and are being updated to the sender's value
- o - the owner is different and is being updated to the sender's value
- g - the group is different and is being updated to the sender's value
- u - reserved for future use
- a - ACL information changed.
- x - extended attribute information changed.
(1) a newly created item replaces each letter with a "+"
(2) an identical item replaces the dots with spaces
(3) an unknown attribute replaces each letter with a "?"
[edit] How to configure cygwin rsyncd server
get rsyncd from cygwin install rsyncd service
cygrunsrv --install "Sync" --path /cygdrive/c/cygwin/bin/rsync.exe --args "--config=/cygdrive/c/cygwin/etc/rsyncd.conf --daemon --no-detach --port 1823" --desc "Synchronization service" --disp "Syncd" --type auto
to remove later use
cygrunsrv --remove "Sync"
Edit c:\cygwin\etc\rsyncd.conf
use chroot = false strict modes = false log format = %h %o %f %l %b log file = /cygdrive/c/Project/rsyncd.log [Project] path = /cygdrive/c/Project comment = Project read only = false auth users = userx secrets file = /etc/rsyncd.secrets
C:\cygwin\etc\rsyncd.secrets
userx:secret
Restart and connect to it:
rsync -arbuz userx@server:Project .
[edit] IBM
[edit] How to get version and patch info for Tivoli Security products
What FixPack or Patch Level Am I On?
This Web Page provides a short summary of how to find the product/patch level for key products and middleware. For additional assistance refer to http://www-306.ibm.com/software/support/ and select the specific product
The following table lists the best ways to find out product/patch levels for the major Tivoli Security products and their middleware.
Product Supplied Utility Linux UNIX Windows Notes ITAMeb pdversion rpm -qa | grep PD Same with installp -l or pkglist ITAMOS pdosversion rpm -qa | grep PDOS " ITAMBI pdmqd -version ITDS ldapsearch -e or idsldapsearch -e rpm -qa | grep idsldap " ITDI Check for fixpack<n>.properties file same same 3. ITFIM rpm -qa | grep FIM rpm -qa | grep FIM " ITIM Check messages.properties or UI login page same same 2. ITIMx Check messages.properties or UI login page same same 2. ITSCM Help screen in UI same same WAS versionInfo.sh <WAS home>/bin/versionInfo.sh DB2 db2level rpm -qa | grep IBM_db2 " 1. IHS apachectl -V 4 rpm -qa | grep IHS " GSKit rpm -qa | grep gsk " Use gsk#ver (such as gsk7ver) IBM Java java -version or java -fullversion rpm -qa | grep IBMJava2 "
Notes:
1 You will need to match the product level with the Additional Information section below to find the fixpack. 2 File is in <itim home>/data. 3 File, if present, is in the <itdi home> directory.
Additional Information Sometimes (but not always) an upgrade will leave files to indicate what patches have been applied.
ITDI FixPacks FixPacks to v6.0 of ITDI has a file called ITDI_INSTALL>/fixpack<n>.properties. So theoretically the highest numbered one of these will tell you what FP you're on.
ITIM Version/Fixpack The messages.properties file (<itim home>/data) is updated when a fixpack is applied. If you look at the top of the file you will see an entry similar to:
# Messages for html pages
# Sapphire Web Gui
# Copyright IBM
# dotNET VERSION 1.3.0
copyright=© 1999-2003 IBM. All Rights Reserved.<br/>\
Tivoli Identity Manager 4.5.1 FP58 Build {0}
detailedCopyright=© 1999-2002 IBM. All rights reserved.<br/>\
IBM, the Identity Manager logo, and Identity Manager are trademarks of IBM.
nochxboxchecked=No entry checked, Please check one or more entries.
subMenuCue=Select an option
refreshButtonAltKey=Refresh list
You can see Tivoli Identity Manager 4.5.1 FP58.
ITFIM Info The FIM runtime version can be seen on the RuntimeNodeManagement panel in ISC. Alternatively, you can look at $FIM_HOME/kg/software.properties and look at the com.tivoli.am.fim.rte.software.displayName value. For FIM WSSM look at the $FIM_HOME/wssm/version.properties file, looking for itfim.build.version.wssm [1]
[edit] Mobile
[edit] How to setup Bluetooth remote on Moto Q
I had some difficulty at first as well. I have a bluetooth dongle but it should be pretty much the same thing for built in bluetooth.
- turn on bt on both devices of course
- make sure to pair devices
- then go to my bluetooth places on your desktop
- navigate from my bluetooth places to your phone (I go to "find bluetooth device" but dont know if this is same for native bt)
- double click your smartphone device once it has been located
(make sure bluesolei hid service is started if using bluesolei)
- when you first connected in this manner my desktop detected a new service called human interface.... double click it and then all the drivers will be installed on your pc....
- using your phone, go to pc remote and you should see your desktop computer name highlited.... click connect
or if using a different stack on the pc, In your bluetooth manager go to options and enable the AV Remote Control Service Then go to add new device and instead of express go go Custom Mode Select your device fromt he found bluetooth devices and select the HID (make sure that your Q is in the BT PC Remote control and searching for device in the bluetooth options)
[edit] Booting
[edit] How to create a bootable kaspersky rescue USB disk
- Download Kaspersky Bootable Rescue Disk ISO image from the official FTP site here
- Download the Gentoo Linux Bootable USB Maker
- Extract Kaspersky-Bootable-Rescue-Disk.zip downloaded above, and Copy kav_rescue_2008.iso downloaded in step 1 to to the newly extracted GentooUSB.
- Double-click and launch fixgt2.bat and enter the USB drive-letter to format and create bootable disk, pay attention here as entering wrong drive letter will result in OS or Data partition getting wiped out.
- Follow the on-screen instructions and your bootable Kaspersky USB Rescue Disk will be ready in minutes.
The batch file simply extracts the ISO, copies the files over and preps the boot sectors. [2]
[edit] Documents
[edit] How to rasterize vector changes in pdf aka embed the markup editing of pdf
file -> save as, select png then file-create pdf-from multiple files. browse, select the png files and create a pdf
or you could resort to a low tech solution - just print the file and scan it back
|
|||||