Had a file whoes names were too long to delete or even rename.
Goto CMD, type dir /a
to see files in short format, eg test~1.pdf
then del text~1.pdf
HTML, CSS, batch commands, and Javascript examples that I have used in my library work. Short entries, designed as quick reference.
By Len Davidson at CUA Law Library
5/26/2016
5/23/2016
changing password for domain account via command line
Our campus IT has blocked change password from Windows (Cntrl-Alt-Del, change password) but you can update it from cmd if you are logged in as the username:
Details from Windows Commandline
net user username new_password /domain
Details from Windows Commandline
4/18/2016
Apple OS via bootable USB drive
What to be able to restore Apple OS for patrons (from Ars Technica):
Apple has actually included a terminal command that can create an install disk for you. Assuming that you have the OS X El Capitan installer in your Applications folder and you have a Mac OS X Extended (Journaled)-formatted USB drive named "Untitled" mounted on the system, you can create an El Capitan install drive by typing the following command into the Terminal.
sudo /Applications/Install\ OS\ X\ El\
Capitan.app/Contents/Resources/createinstallmedia --volume
/Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\
Capitan.app --nointeraction
The command will erase the disk and copy the install files over. Give
it some time, and your volume will soon be loaded up with not just the
OS X installer but also an external recovery partition that may come in
handy if your hard drive dies and you're away from an Internet
connection.
4/15/2016
Microsoft Forefront definitions file
Have a number of PCs that were not updating the virus definitions file, so need to manually install it:
To download the Microsoft Forefront Client Security, the Microsoft Forefront Endpoint Protection 2010, or the Microsoft System Center 2012 Endpoint Protection antimalware definition update file (Mpam-fe.exe) for 32-bit (x86-based) versions of Windows, click the following link:From Microsoft support
To download the Microsoft Forefront Client Security, Microsoft Forefront Endpoint Protection 2010 or Microsoft System Center 2012 Endpoint Protection antimalware definition update file for 64-bit versions of Windows, click the following link: Note: You must be running a 64-bit version of Windows to run a 64-bit version of Microsoft Forefront Client Security, Microsoft Forefront Endpoint Protection 2010 or Microsoft System Center 2012 Endpoint Protection. The 64-bit versions of Windows include x64-based versions.
After you click the appropriate link, click Run to install the definition update file immediately. Or, click Save to save the file to the computer. If you click Save, remember the folder where you save the file.
To install the saved file, click Start, click Run, locate the folder where you saved the file, double-click the file, and then click OK.
4/05/2016
Linux OS reviews
Looking at different Linux versions, here are some reviews
http://www.techradar.com/us/news/software/operating-systems/best-linux-distro-five-we-recommend-1090058
http://www.howtogeek.com/191207/10-of-the-most-popular-linux-distributions-compared/
http://www.techradar.com/us/news/software/operating-systems/best-linux-distro-five-we-recommend-1090058
http://www.howtogeek.com/191207/10-of-the-most-popular-linux-distributions-compared/
3/09/2016
Chrome OS on old PCs
Looking to salvage older equipment by installing Chrome OS:
http://arstechnica.com/gadgets/2015/10/turning-a-crappy-old-windows-pc-into-a-full-fledged-chromebook-with-cloudready/
http://www.theverge.com/video/2016/3/7/11161620/how-to-chromebook-pc-tips-tricks-hacks
https://www.neverware.com/
2/12/2016
Transferring sticky notes to new PC
Built into Windows OS are Sticky Notes. Have a patron that wants to transfer their notes from old PC to new one. Just need to copy the file below:
This will overwrite notes on new machine.
From Superuser and PCadvisor
All notes are stored in one file:
or possibly%AppData%\Microsoft\Sticky Notes\StickyNotes.snt
%AppData%\Roaming\Microsoft\Sticky Notes\StickyNotes.snt
This will overwrite notes on new machine.
From Superuser and PCadvisor
1/29/2016
Maintenance kit service for HP 600 laserjet
Video to change fuser, transfer roller on HP 600 laserjet;
How To Reset the Maintenance Count on the M600, M601, M602, M603 series
1. Press the Home button on the printer's control panel.
2. Open the "Administration" menu.
3. Select "Manage Supplies".
4. Select "Reset Supplies".
5. Select "New Maintenance Kit".
6. Select "Yes" to reset the maintenance kit counter.
How To Reset the Maintenance Count on the M600, M601, M602, M603 series
1. Press the Home button on the printer's control panel.
2. Open the "Administration" menu.
3. Select "Manage Supplies".
4. Select "Reset Supplies".
5. Select "New Maintenance Kit".
6. Select "Yes" to reset the maintenance kit counter.
1/27/2016
Parsing string for date using Javascript
Have a CMD command that returns the user expiration date, to get it into Javascript:
var
stringToParse =
"You have a doctor's appointment on 2012/03/13 16:00. Please show up on time."
;
var
dateString = stringToParse.match(/\d{4}\/\d{2}\/\d{2}\s+\d{2}:\d{2}/);
var
dt =
new
Date(dateString);
console.log(dt);
//prints "Tue March 13 16:00:00 EDT 2012"
http://www.htmlgoodies.com/html5/javascript/date-parsing-using-javascript-and-regular-expressions.htm
1/14/2016
iFrame tag scaling
I want to display an iFrame with a scaled version of a web page, use CSS to do the scaling:
<style>
#wrap { width: 600px; height: 390px; padding: 0; overflow: hidden; }
#frame { width: 800px; height: 520px; border: 1px solid black; }
#frame { zoom: 0.75; -moz-transform: scale(0.75); -moz-transform-origin: 0 0; }
</style>
From stackoverflow and collaboration133
And can even scroll to a part of the web page:
#my-div
{
width : 400px;
height : 200px;
overflow : hidden;
position : relative;
}
#my-iframe
{
position : absolute;
top : -100px;
left : -100px;
width : 1280px;
height : 1200px;
}
Here you have one DIV with dimensions 400x200px. Now by moving the IFRAME within it you can position it on the right place.<div id="my-div"> <iframe src="http://www.example.com" id="my-iframe" scrolling="no"></iframe> </div>
1/08/2016
Maps & images from NYPL
Some great images of old street scenes from NYC http://publicdomain.nypl.org/fifth-avenue/
Overview of open domain images from NYPL: http://www.theverge.com/2016/1/6/10723680/nyc-library-public-domain-images-digital
And a tutorial on digitizing maps, and page for NYPL Labs
1/06/2016
Free tools for screen capture
Some tools for screen capture for Windows:
Chrome addin from Snagit
Free addin for MS powerpoint: https://mix.office.com/en-us/Home
Reviews:
http://www.pcworld.com/article/2836252/office-mix-now-lets-powerpoint-users-create-on-the-fly.html
http://www.edtechroundup.org/reviews/office-mix-powerpoint-gets-interactive
Chrome addin from Snagit
Free addin for MS powerpoint: https://mix.office.com/en-us/Home
Reviews:
http://www.pcworld.com/article/2836252/office-mix-now-lets-powerpoint-users-create-on-the-fly.html
http://www.edtechroundup.org/reviews/office-mix-powerpoint-gets-interactive
12/22/2015
Canned responses for Google Mail
Had a patron who was disappointed that new Google mail only had one signature (unlike Outlook which allowed you to define multiple signatures). But from Google Labs, you can setup canned responses [ActiveInBox]
Gmail has only one signature you can use, and it will add itself to all your emails and replies, every time. It is not exactly well designed or flexible for businesses.
If you’ve ever used the desktop version of Outlook you’ll know how easy it is to add different signatures to an email.
But you can also have quick access to multiple saved signatures in Gmail.
All you need to do is enable the Gmail ‘Lab’ (an extension) built by the Gmail team themselves, called Canned Responses. You can simply enable it from Gmail’s settings. [from ActiveInBox]
12/21/2015
Migrating PST files to Google Mail
Here is the tool to upload Outlook PST files to Google mail https://tools.google.com/dlpage/outlookmigration
Creates a tag <name of file>.pst and labels all imported emails with that tag.
Creates a tag <name of file>.pst and labels all imported emails with that tag.
11/17/2015
Cleaning up harddrive - Windows
List of different tools http://www.howtogeek.com/113012/10-best-free-tools-to-analyze-hard-drive-space-on-your-windows-pc/
WinDirStat is highly rated
TreeSize is one I have used in the past
WinDirStat is highly rated
TreeSize is one I have used in the past
11/11/2015
Website monitoring tool
A good free website monitoring tool is uptimerobot
For lists of good tools:
http://mashable.com/2010/04/09/free-uptime-monitoring/
https://besthostingsearch.net/tutorial/top-5-website-uptime-monitoring-tools/
http://www.capterra.com/website-monitoring-software/
For lists of good tools:
http://mashable.com/2010/04/09/free-uptime-monitoring/
https://besthostingsearch.net/tutorial/top-5-website-uptime-monitoring-tools/
http://www.capterra.com/website-monitoring-software/
10/22/2015
SQL for all big records
This SQL will give you links to all the bib records in your III catalog: (Sierra Listserv, Craig Borman)
SELECT
--*
--p.best_title_norm,
--p.best_author_norm,
'http://your.iii.catalog.url.here/record=b' || m.record_num || '&' || 'title=' || p.best_title_norm || '&' || 'author=' || p.best_author_norm || '/'
FROM
sierra_view.record_metadata m
LEFT OUTER JOIN sierra_view.bib_record_property p
ON (m.id = p.bib_record_id)
WHERE
m.record_type_code = 'b'
AND
m.campus_code = ''
AND
m.deletion_date_gmt IS null
LIMIT 500
--OFFSET 1500000
;
https://github.com/joemontibello/iii-sql-queries
SELECT
--*
--p.best_title_norm,
--p.best_author_norm,
'http://your.iii.catalog.url.here/record=b' || m.record_num || '&' || 'title=' || p.best_title_norm || '&' || 'author=' || p.best_author_norm || '/'
FROM
sierra_view.record_metadata m
LEFT OUTER JOIN sierra_view.bib_record_property p
ON (m.id = p.bib_record_id)
WHERE
m.record_type_code = 'b'
AND
m.campus_code = ''
AND
m.deletion_date_gmt IS null
LIMIT 500
--OFFSET 1500000
;
https://github.com/joemontibello/iii-sql-queries
10/03/2015
pgAdmin error: MSVCP120.dll missing
Tried running pgAdmin, got error missing MSVCP120.dll
Downloaded Microsoft Visual C++ 2013 64 bit, still did not solve problem.
Turns out, have to download/install the x86 version, as well as x64 version,
even if you are running 64 bit Windows
From:
http://stackoverflow.com/questions/24726910/exe-gives-error-msvcp120-dll-is-missing-for-win7x64
9/16/2015
SQL for fines Purged from III ILS
From Sierra Listserv, 2015-09
Report for fine purges from a Sierra database, used the query below to produce a report in the same format as the Fines Paid function.
WITH
charge_type(charge_type_code, charge_type_desc) AS
(
VALUES
( '1', 'Manual Charge' ),
( '2', 'Overdue' ),
( '3', 'Replacement' ),
( '4', 'Adjustment' ),
( '5', 'Lost Book' ),
( '6', 'Overdue Renewed' ),
( '7', 'Rental' ),
( '8', 'Rental Adjustment' ),
( '9', 'Debit' ),
( 'a', 'Notice' ),
( 'b', 'Credit Card' ),
( 'p', 'Program' )
),
fine_creation_mode(fine_creation_mode_code, fine_creation_mode_desc) AS
(
VALUES
( 'a', 'Automatic' ),
( 'm', 'Manual' ),
( 'x', 'Adjustment' )
),
payment_status(payment_status_code, payment_status_desc) AS
(
VALUES
( '0', 'No Payment' ),
( '1', 'Full Payment' ),
( '2', 'Partial Payment' ),
( '3', 'Waive' ),
( '4', 'Item Busy' ),
( '5', 'Will Pay' ),
( '6', 'Purge' ),
( '7', 'Credit' ),
( '8', 'Adjustment' )
)
SELECT
to_char(fp.fine_assessed_date_gmt, 'MM/DD/YYYY') AS "Date Assessed",
TRIM(BOTH FROM pn.last_name || ', ' || pn.first_name || ' ' || pn.middle_name) AS "Patron Name",
pm.record_num AS "Patron Record",
fp.patron_record_metadata_id AS "Patron Unique ID",
fp.invoice_num AS "Invoice",
fp.item_charge_amt AS "Charge Amount",
fp.processing_fee_amt AS "Processing Fee",
fp.billing_fee_amt AS "Billing Fee",
ct.charge_type_desc AS "Charge Type",
fp.charge_location_code AS "Owning Location",
to_char(fp.paid_date_gmt, 'MM/DD/YYYY') AS "Date Paid",
fp.tty_num AS "Statistics Group",
fp.last_paid_amt AS "Last Payment",
fp.iii_user_name AS "Initials",
fcm.fine_creation_mode_desc AS "Creation Mode",
fp.description AS "Description",
fp.paid_now_amt AS "Amount Paid",
ps.payment_status_desc AS "Payment Status",
COALESCE(NULLIF(fp.payment_type_code, ''), 'null') AS "Payment Type",
fp.payment_note AS "Payment Note"
FROM
sierra_view.fines_paid AS fp
LEFT JOIN sierra_view.record_metadata AS pm
ON (
pm.id = fp.patron_record_metadata_id
)
LEFT JOIN sierra_view.patron_record_fullname AS pn
ON (
pn.patron_record_id = fp.patron_record_metadata_id
AND pn.display_order = 0
)
LEFT JOIN charge_type AS ct USING ( charge_type_code )
LEFT JOIN fine_creation_mode AS fcm USING ( fine_creation_mode_code )
LEFT JOIN payment_status AS ps USING ( payment_status_code )
;
Regards,
Jim Nicholls
-----------------
-----------------
For the query to work with multiple fine purges and when your fines_paid has more than just fine purge data, you need to add the following where clause:
WHERE
fp.payment_status_code = '6'
AND fp.paid_date_gmt >= DATE '2014-12-16' -- Purge date, YYYY-MM-DD
I’ve added the query to the IUG clearinghouse.
Regards,
Jim
9/10/2015
SQL to locate item records with no bib records
Here is SQL for III ILS to locate item records with no bib records:
-- Locate for item records with no links
-- John Boggs - Sierra Listerv - 2015-09
SELECT
*
FROM
sierra_view.item_view
LEFT JOIN
sierra_view.bib_record_item_record_link ON
item_view.id = bib_record_item_record_link.item_record_id
WHERE
bib_record_item_record_link.item_record_id is NULL
Subscribe to:
Posts (Atom)