Archive
Tag "Stash/Code"

Here's a cool, handy macro to auto-generate a Table of Con­tents for any Excel file.

Read More

A web-based "round-trip" HTML edi­tor. You can code HTML and see how it looks on the side, or write text with for­mat­ting and see cor­re­spond­ing HTML inter­ac­tively. Uses IE spe­cific func­tions so cur­rently works only with IE, but should give you ideas.

Read More

Perl Dig­ger is a free­ware Perl script to dig for infor­ma­tion about the server-side envi­ron­ment includ­ing a list of all installed Perl mod­ules with a handy link to their doc­u­men­ta­tion at CPAN. The script is based on sim­ple CSS, so you can eas­ily mod­ify how it looks.

Read More

URL Dig­ger (for­merly Snip­Stash) is a meta tags ana­lyzer (and then some). Please note that any URLs "dug" will show user agent as 'Sniptools/UrlDigger-0.9.1'.

Read More

Here's a handy macro to make a new work­sheet inside your Excel file, then tra­verse through each and every sheet in the file, col­lect­ing all func­tions and for­mu­las used in the whole file. All these for­mu­las are listed on a sep­a­rate work­sheet in the same file.

Here's a handy macro to make a new work­sheet inside your Excel file, then tra­verse through each and every sheet in the file, col­lect­ing all func­tions and for­mu­las used in the whole file. All these for­mu­las are listed on a sep­a­rate work­sheet in the same file.

The code is below, feel free to use it but please attribute when­ever you use it, thanks –

Option Explicit
Public Sub ListFormulasInWorkbook()
Const SHEETNAME As String = "Formulas in *"
Have fun!
Const ALLFORMULAS As Integer = _
xlNumbers + xlTextValues + xlLogical + xlErrors
Const maxRows As Long = 65500
Dim formulaSht As Worksheet
Dim destRng As Range
Dim cell As Range
Dim wkSht As Worksheet
Dim formulaRng As Range
Dim shCnt As Long
Dim oldScreenUpdating As Boolean
With Application
oldScreenUpdating = .ScreenUpdating
.ScreenUpdating = False
End With
shCnt = 0
ListFormulasAddSheet formulaSht, shCnt
' Enumerate formulas on each sheet
Set destRng = formulaSht.Range("A4")
For Each wkSht In ActiveWorkbook.Worksheets
If Not wkSht.Name Like SHEETNAME Then
Application.StatusBar = wkSht.Name
destRng.Value = wkSht.Name
Set destRng = destRng.Offset(1, 0)
On Error Resume Next
Set formulaRng = wkSht.Cells.SpecialCells( _
xlCellTypeFormulas, ALLFORMULAS)
On Error GoTo 0
If formulaRng Is Nothing Then
destRng.Offset(0, 1).Value = "None"
Set destRng = destRng.Offset(1, 0)
Else
For Each cell In formulaRng
With destRng
.Offset(0, 1) = cell.Address(0, 0)
.Offset(0, 2) = "'" & cell.Formula
.Offset(0, 3) = cell.Value
End With
Set destRng = destRng.Offset(1, 0)
If destRng.row > maxRows Then
ListFormulasAddSheet formulaSht, shCnt
Set destRng = formulaSht.Range("A5")
destRng.Offset(-1, 0).Value = wkSht.Name
End If
Next cell
Set formulaRng = Nothing
End If
With destRng.Resize(1, 4).Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
Set destRng = destRng.Offset(1, 0)
If destRng.row > maxRows Then
ListFormulasAddSheet formulaSht, shCnt
Set destRng = formulaSht.Range("A5")
destRng.Offset(-1, 0).Value = wkSht.Name
End If
End If
Next wkSht
With Application
.StatusBar = False
.ScreenUpdating = oldScreenUpdating
End With
End Sub
Private Sub ListFormulasAddSheet( _
formulaSht As Worksheet, shtCnt As Long)
Const SHEETNAME As String = "Formulas in "
Const SHEETTITLE As String = "Formulas in $ as of "
Const DATEFORMAT As String = "dd MMM yyyy hh:mm"
Dim shtName As String
With ActiveWorkbook
' Delete existing sheet, create new
shtCnt = shtCnt + 1
shtName = Left(SHEETNAME & .Name, 28)
If shtCnt > 1 Then _
shtName = shtName & "_" & shtCnt
On Error Resume Next
Application.DisplayAlerts = False
.Worksheets(shtName).Delete
Application.DisplayAlerts = True
On Error GoTo 0
Set formulaSht = .Worksheets.Add( _
after:=Sheets(Sheets.Count))
End With
With formulaSht
' Format headers
.Name = shtName
.Columns(1).ColumnWidth = 15
.Columns(2).ColumnWidth = 8
.Columns(3).ColumnWidth = 60
.Columns(4).ColumnWidth = 40
With .Range("C:D")
.Font.Size = 9
.HorizontalAlignment = xlLeft
.EntireColumn.WrapText = True
End With
With .Range("A1")
.Value = Application.Substitute(SHEETTITLE, "$", _
ActiveWorkbook.Name) & Format(Now, DATEFORMAT)
With .Font
.Bold = True
.ColorIndex = 5
.Size = 14
End With
End With
With .Range("A3").Resize(1, 4)
.Value = Array("Sheet", "Address", "Formula", "Value")
With .Font
.ColorIndex = 13
.Bold = True
.Size = 12
End With
.HorizontalAlignment = xlCenter
With .Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = 5
End With
End With
End With
End Sub

Have fun!

Read More

Web­site URLs are long and dif­fi­cult to remem­ber. SnipURL allows you to 'snip' your long URLs into small, friendly and per­sis­tent links for shar­ing and remem­ber­ing. Free!

Web­site URLs are long and dif­fi­cult to remem­ber. SnipURL allows you to 'snip' your long URLs into small, friendly and per­sis­tent links for shar­ing and remem­ber­ing. Free!

Fol­low­ing are some fea­tures of SnipURL –

1. SHORTEN LONG, DIFFICULT-TO-REMEMBER URLs
Web­site URLs are get­ting longer and cum­ber­some. Not only are they dif­fi­cult
to remem­ber, it is also a pain send­ing them in emails because they
wrap on to more than one line and become un-clickable! SnipURL is a
fast and free ser­vice that allows you to "snip" your long URLs into small, com­pact links for shar­ing in emails and remem­ber­ing easily.

Con­sider a web URL like the fol­low­ing (It is a real web­site, go
ahead and click it if you wish) –

Some­thing

After "snip­ping" the same above URL looks like this –


http://snipurl.com/d (20 char­ac­ters)
http://snipurl.com/memento (26 characters)

or

http://snurl.com/d (18 char­ac­ters)
http://snurl.com/memento (24 characters)

SnURL and SnipURL are the same domain. Note that these four URLs are small so you can send them in emails with­out the fear of them wrap­ping, mean­ing­ful so you can remem­ber and share them in the future, and per­ma­nent so if your under­ly­ing URL expires or changes you can always mod­ify your snipped URL. (Asa bonus, you can even see the pop­u­lar­ity of you URLs by view­ing how many peo­ple clicked on it). Snip­ping is easy. You can set up a short­cut (book­marklet) on your browser and you're ready to go.


2. IN FIVE LANGUAGES (and more com­ing soon!)
The web­site
can be viewed in Eng­lish,
Chi­nese,
Japan­ese,
Span­ish and
French. We are also
work­ing on text-only
ver­sions in each of these lan­guages so that makes it 10 types
of web­sites as we write this. Among these lan­guages, we cover at
least around 80% of the world if not more.


3. MORE INTUITIVE URLs WITH NICKNAMES
Don't like URLs
like
target="_blank">http_//snipurl.com/h because they are just some
ran­dom text? Then you can make

target="_blank">http_//snipurl.com/digicam_review and post more
intu­itive URLs to your mail­ing lists or in your newslet­ters with
sophis­ti­cated user track­ing etc.

4. PROTECTED SNIPPED URLs (PRIVATE)
Wor­ried that
peo­ple can basi­cally guess
http://snipurl.com/1 or
http://snipurl.com/2 or
http://snipurl.com/<some
sequence here>? But want to have a URL that you wish to
track BUT only with users you send the URL to? Then you can
"pro­tect" your snip­pings with a key­code. SO instead of a URL such
as http://snipurl.com/i, it will
become
http://snipurl.com/i-secret
where "secret" was your pass­word. Pri­vate "snip­pings" are excluded
from our sta­tis­tics or search of course.


5. INTUITIVE STATISTICS & SEARCH IN "MYSNIPURL"
A
quick reg­is­tra­tion process gives you access to all the URLs you
have snipped in one screen, along with click-through sta­tis­tics.
You can also search for the URLs you have snipped by enter­ing
key­words that were con­tained in the orig­i­nal link or the nick­names
you gave to your snipped URLs. Apart from your own URLs, we also
have some pop­u­lar sta­tis­tics under the
EVERYTHING ELSE sec­tion, which includes for
instance the Most Pop­u­lar
Snip­pings.


6. EDIT SNIPPINGS!
If your under­ly­ing link has expired
or is dead­link, you can always edit your snip­ping from the
MYSNIPURL page. (None of the com­pa­ra­ble web­sites that we are aware
of offer a pos­si­bil­ity to edit your snippings).


7. SHORTCUT
A spiffy short­cut allows you to add a
"book­marklet" to your browser and "snip" URLs quickly (for peo­ple
who do not under­stand book­marklets, we have a lit­tle visual help:

onclick="window.open(this.href, this.target,'status=yes,width=780,height=569'); return false"
title="Opens in a new win­dow: How to drag the shortcut">http_//snipurl.com/SnipThis.htm
which is a flash ani­ma­tion and opens in a new win­dow or a
more detailed
FAQ).

  • Copy to clip­board quickly (pop up win­dow closes auto­mat­i­cally
    after you copy the snipped URL in your clipboard)
  • Share the snipped URL right from this website
  • Com­pose new mails (using your default email client) …the
    snipped URL is auto­mat­i­cally inserted

8. A PUBLIC STATISTICS PAGE WITH FLOOD CONTROL
A pub­lic
sta­tis­tics page
(http://snipurl.com/else.php)
allows you to see the most pop­u­lar snip­pings. A "flood con­trol"
mech­a­nism is imple­mented in this web­page so that unfairly "bumped"
accesses to URLs are care­fully chaffed out. And of course, users
can search these too. "PROTECTED" URLs are not included in this
pub­lic view of course.


9. REAL REDIRECTS
SnipURL will also let you do "deep
snip­ping". So if your snipped web­site is
"http://snipurl.com/e" (which
points to the web­site
"http://www.copyright.gov")
and you have direc­to­ries and files below that level, you can access
them using
"http://snipurl.com/e/carp/index.html"
which is actu­ally
http://www.copyright.gov/carp/index.html.


10. SPAM CONTROL
If a snipped redi­rec­tion is sus­pected
unfair use of our ser­vices and is in vio­la­tion of our Terms of Use,
we reserve the right to sus­pend the snip­ping. An exam­ple is http://snipurl.com/th.


11. VISUAL INDICATION OF URL TYPES
When in the sta­tis­tics web­page, a visual icon indi­cates what the nature of the
under­ly­ing URL is. E.g., http://snipurl.com/else.php, so that you can decide before you unwit­tingly click on an exe­cutable or a PDF file for instance.

12. PERMANANT SNIPPINGS!
Your snipped or short­ened
URLs will be left as they are (you can always edit them too, of
course). Snipped URLs never die, they just get spam pro­tected,
if any­thing.
:)

13. TEXT-ONLY
VERSION FOR DIAL-UP USERS, OR FOR

target="_blank">MINIMALISTS IN GENERAL

If you find graph­ics obstruct­ing your work (although they make the
infor­ma­tion more visu­ally intu­itive, so we would rec­om­mend using
this ver­sion if pos­si­ble), then you can use our toned-down text
ver­sion as well. Read more about this in our FAQ.

14. A PERL API
SnipURL now exists as a Perl API for those who are inter­ested! Click here to go get the mod­ule at CPAN. (Thanks to Taguchi-san of Cisco for let­ting us know about this)

Read More