Pages

Showing posts with label Tips n' Tricks. Show all posts
Showing posts with label Tips n' Tricks. Show all posts
Tuesday, January 2, 2018

Getting Organized in the New Year

0 comments
I know a lot of folks who have made resolutions to get organized this year and one of the things they're taking a good look at is the amount of email on their phones.  Some have hundreds or even thousands of messages sitting there eating up storage and making finding anything a real chore.

So, if you're in the same boat, using an iPhone, and want to dump all those messages I'll show you how to delete them all in one process without having to click on each one to select them.

(Pssst - this tip will let you bulk delete OR bulk move messages around in iOS 10)


  1. If there are any messages in the folder that you want to keep, move them to another folder.
  2. Once you're sure that only unwanted emails are left, tap  "Edit" in the upper-right corner. Once in edit mode, select one email by tapping the circle to the left of it.
  3. Tap and hold the "Move" button located at the bottom of your screen, but don't let go just yet. tap the circle to the left of the email that you chose in the previous step to deselect it, now you can take your finger off the "Move" button. This selects all of the emails in the folder at once.
  4. Tap "Trash" on the next screen to move all of the emails to the Trash folder.
  5. To completely delete the messages, open the Trash folder, tap "Edit", and tap "Delete All".
That's all there is to it and the clutter is gone, Gone, GONE.

Continue reading →
Sunday, October 4, 2015

Windows God Mode

0 comments
Just the other day I was helping a friend set up their computer after doing a full reinstall of the OS.

Now configuring a system can get to be a bit tedious with all of the clicking necessary to get to all of the settings and tools.  So to make things a little easier, I clued him into Windows' God Mode.

God mode puts all of the the things you can customize together in one place on your Windows machine, and it is available from Windows Vista through Windows 10.

Getting to God Mode is easy; just create a folder anywhere you like and name it God Mode.{ED7BA470-8E54-465E-825C-99712043E01C}

Actually, you can name it anything you like before the dot.  the important part is what comes after the dot.  Don't change that part.

Once you rename the folder, open it up and you'll find a wealth of tweaks and tools.

Give it a look if you're of the mind.  If you find it convenient, enjoy.  If it's not for you, just delete the folder and it's gone.
Continue reading →
Wednesday, February 5, 2014

CSRF/XSRF Protection in ColdFusion 9

0 comments
Here's another little thing that's come across my desk and I hope my solution can be of some help to others.

I was asked to provide a solution to protect a site from Cross Site Request Forgery (CSRF or XSRF) attacks.  Specifically, there were forms on the site that were considered at-risk for exploitation.  I won't get into great detail on what CSRF is, but basically it's an attack vector that attempts to exploit the trust that a website has in the user's browser to allow malicious actions to take place on the server.  

CF10 has methods for CSRF protection available built in, but the site I was asked to chime in on is on CF9.

So, the forms were vulnerable to a CSRF attack because a malicious user could cause a legitimate, authenticated user to unwittingly submit them.  In order to protect the public facing forms, it's necessary to set up a condition where the server can trust that the form submission is from the legitimate user during their session.  The method CF10 uses is to send a token with the form and check for it on submission.  We can do the same thing by adding just a few lines of code to our forms.

Here's a typical self-posting form:
<cfif structKeyExists(form, 'sendInfo')>
       <p>Your information has been received.</p>
    <cfelse>
      <cfform>
            <label for="fName">First name:</label><cfinput name="fName" type="text"><br>
            <label for="lName">Last name:</label><cfinput name="lName" type="text"><br>
            <input type="submit" value="Submit" name="sendInfo">
      </cfform>
    </cfif>

Let's add a token to the form that the server can check for:
<cfif structKeyExists(form, 'sendInfo')>
       <p>Your information has been received.</p>
    <cfelse>
      <cfset session.foobar = createUUID()>
      <cfform>
            <cfoutput><input type="hidden" name="foobar" value="#session.foobar#"></cfoutput>
            <label for="fName">First name:</label><cfinput name="fName" type="text"><br>
            <label for="lName">Last name:</label><cfinput name="lName" type="text"><br>
            <input type="submit" value="Submit" name="sendInfo">
      </cfform>
    </cfif>


Next, we want the form processor to check for the token:
<cfif structKeyExists(form, 'sendInfo')>    
    <cfif structKeyExists(session, 'foobar') and form.foobar is session.foobar>
       <p>Your information has been received.</p>
       <cfelse>
           <p>The form has a problem</p>
       </cfif>
    <cfelse>
      <cfset session.foobar = createUUID()>
      <cfform>
            <cfoutput><input type="hidden" name="foobar" value="#session.foobar#"></cfoutput>
            <label for="fName">First name:</label><cfinput name="fName" type="text"><br>
            <label for="lName">Last name:</label><cfinput name="lName" type="text"><br>
            <input type="submit" value="Submit" name="sendInfo">
      </cfform>
    </cfif>


And finally, we want to do a little housekeeping by dropping the token from the session when we're done with it:
<cfif structKeyExists(form, 'sendInfo')>    
    <cfif structKeyExists(session, 'foobar') and form.foobar is session.foobar>
       <p>Your information has been received.</p>
       <cfelse>
           <p>The form has a problem</p>
       </cfif>
    <cfset structDelete(session, 'foobar')>
    <cfelse>
      <cfset session.foobar = createUUID()>
      <cfform>
            <cfoutput><input type="hidden" name="foobar" value="#session.foobar#"></cfoutput>
            <label for="fName">First name:</label><cfinput name="fName" type="text"><br>
            <label for="lName">Last name:</label><cfinput name="lName" type="text"><br>
            <input type="submit" value="Submit" name="sendInfo">
      </cfform>
    </cfif>

So there ya' go.  A handful of code and you've got your server recognizing your forms for a one-time post and bouncing them on any attempted re-posting.

Continue reading →
Friday, March 22, 2013

Deleting a Printer that Just Won't Go Away

0 comments
Have you ever had a problem deleting a printer?

I'd physically gotten rid of an old printer, but I couldn't delete it from my Windows 7 computer; no matter how many times I tried, it just wouldn't go away.

If you're having a similar problem, here's how I cleared it up.

There was a document in the queue that I'd cancelled, but it wouldn't drop.  That was holding the printer.  I needed to force the print spool to release the document, so the system would drop the printer.  A command file would do the trick.  Here's what to do:

Open notepad and paste in these 4 lines

net stop spooler
del %systemroot%\system32\spool\printers\*.shd
del %systemroot%\system32\spool\printers\*.spl
net start spooler


Save the document as deletePrinter.cmd
Right-click the file you just created and select 'Run as administrator'

You may need to restart your computer afterwards, but that will delete any print jobs and the printer should be gone.




Continue reading →
Sunday, December 23, 2012

ASCII Characters and Symbols

0 comments
Every so often I find that I need to place a special character and I just don't remember the coding.  I've usually had to Google around and look at multiple sites before finding the character I want. So I decided to compile a comprehensive list and put it here for easy reference.

CHR(#)HTML EntitySymbol
chr(160)&nbsp;
chr(161)&iexcl;¡
chr(162)&cent;¢
chr(163)&pound;£
chr(164)&curren;¤
chr(165)&yen;¥
chr(166)&brvbar;¦
chr(167)&sect;§
chr(168)&uml;¨
chr(169)&copy;©
chr(170)&ordf;ª
chr(171)&laquo;«
chr(172)&not;¬
chr(173)&shy;­
chr(174)&reg;®
chr(175)&macr;¯
chr(176)&deg;°
chr(177)&plusmn;±
chr(178)&sup2;²
chr(179)&sup3;³
chr(180)&acute;´
chr(181)&micro;µ
chr(182)&para;
chr(183)&middot;·
chr(184)&cedil;¸
chr(185)&sup1;¹
chr(186)&ordm;º
chr(187)&raquo;»
chr(188)&frac14;¼
chr(189)&frac12;½
chr(190)&frac34;¾
chr(191)&iquest;¿
chr(192)&Agrave;À
chr(193)&Aacute;Á
chr(194)&Acirc;Â
chr(195)&Atilde;Ã
chr(196)&Auml;Ä
chr(197)&Aring;Å
chr(198)&AElig;Æ
chr(199)&Ccedil;Ç
chr(200)&Egrave;È
chr(201)&Eacute;É
chr(202)&Ecirc;Ê
chr(203)&Euml;Ë
chr(204)&Igrave;Ì
chr(205)&Iacute;Í
chr(206)&Icirc;Î
chr(207)&Iuml;Ï
chr(208)&ETH;Ð
chr(209)&Ntilde;Ñ
chr(210)&Ograve;Ò
chr(211)&Oacute;Ó
chr(212)&Ocirc;Ô
chr(213)&Otilde;Õ
chr(214)&Ouml;Ö
chr(215)&times;×
chr(216)&Oslash;Ø
chr(217)&Ugrave;Ù
chr(218)&Uacute;Ú
chr(219)&Ucirc;Û
chr(220)&Uuml;Ü
chr(221)&Yacute;Ý
chr(222)&THORN;Þ
chr(223)&szlig;ß
chr(224)&agrave;à
chr(225)&aacute;á
chr(226)&acirc;â
chr(227)&atilde;ã
chr(228)&auml;ä
chr(229)&aring;å
chr(230)&aelig;æ
chr(231)&ccedil;ç
chr(232)&egrave;è
chr(233)&eacute;é
chr(234)&ecirc;ê
chr(235)&euml;ë
chr(236)&igrave;ì
chr(237)&iacute;í
chr(238)&icirc;î
chr(239)&iuml;ï
chr(240)&eth;ð
chr(241)&ntilde;ñ
chr(242)&ograve;ò
chr(243)&oacute;ó
chr(244)&ocirc;ô
chr(245)&otilde;õ
chr(246)&ouml;ö
chr(247)&divide;÷
chr(248)&oslash;ø
chr(249)&ugrave;ù
chr(250)&uacute;ú
chr(251)&ucirc;û
chr(252)&uuml;ü
chr(253)&yacute;ý
chr(254)&thorn;þ
chr(255)&yuml;ÿ
chr(34)&quot;"
chr(38)&amp;&
chr(60)&lt;<
chr(62)&gt;>
chr(39)&apos;'
chr(338)&OElig;Œ
chr(339)&oelig;œ
chr(352)&Scaron;Š
chr(353)&scaron;š
chr(376)&Yuml;Ÿ
chr(710)&circ;ˆ
chr(732)&tilde;˜
chr(8194)&ensp;
chr(8195)&emsp;
chr(8201)&thinsp;
chr(8204)&zwnj;
chr(8205)&zwj;
chr(8206)&lrm;
chr(8207)&rlm;
chr(8211)&ndash;
chr(8212)&mdash;
chr(8216)&lsquo;
chr(8217)&rsquo;
chr(8218)&sbquo;
chr(8220)&ldquo;
chr(8221)&rdquo;
chr(8222)&bdquo;
chr(8224)&dagger;
chr(8225)&Dagger;
chr(8240)&permil;
chr(8249)&lsaquo;
chr(8250)&rsaquo;
chr(8364)&euro;
chr(402)&fnof;ƒ
chr(913)&Alpha;Α
chr(914)&Beta;Β
chr(915)&Gamma;Γ
chr(916)&Delta;Δ
chr(917)&Epsilon;Ε
chr(918)&Zeta;Ζ
chr(919)&Eta;Η
chr(920)&Theta;Θ
chr(921)&Iota;Ι
chr(922)&Kappa;Κ
chr(923)&Lambda;Λ
chr(924)&Mu;Μ
chr(925)&Nu;Ν
chr(926)&Xi;Ξ
chr(927)&Omicron;Ο
chr(928)&Pi;Π
chr(929)&Rho;Ρ
chr(931)&Sigma;Σ
chr(932)&Tau;Τ
chr(933)&Upsilon;Υ
chr(934)&Phi;Φ
chr(935)&Chi;Χ
chr(936)&Psi;Ψ
chr(937)&Omega;Ω
chr(945)&alpha;α
chr(946)&beta;β
chr(947)&gamma;γ
chr(948)&delta;δ
chr(949)&epsilon;ε
chr(950)&zeta;ζ
chr(951)&eta;η
chr(952)&theta;θ
chr(953)&iota;ι
chr(954)&kappa;κ
chr(955)&lambda;λ
chr(956)&mu;μ
chr(957)&nu;ν
chr(958)&xi;ξ
chr(959)&omicron;ο
chr(960)&pi;π
chr(961)&rho;ρ
chr(962)&sigmaf;ς
chr(963)&sigma;σ
chr(964)&tau;τ
chr(965)&upsilon;υ
chr(966)&phi;φ
chr(967)&chi;χ
chr(968)&psi;ψ
chr(969)&omega;ω
chr(977)&thetasym;ϑ
chr(978)&upsih;ϒ
chr(982)&piv;ϖ
chr(8226)&bull;
chr(8230)&hellip;
chr(8242)&prime;
chr(8243)&Prime;
chr(8254)&oline;
chr(8260)&frasl;
chr(8472)&weierp;
chr(8465)&image;
chr(8476)&real;
chr(8482)&trade;
chr(8501)&alefsym;
chr(8592)&larr;
chr(8593)&uarr;
chr(8594)&rarr;
chr(8595)&darr;
chr(8596)&harr;
chr(8629)&crarr;
chr(8656)&lArr;
chr(8657)&uArr;
chr(8658)&rArr;
chr(8659)&dArr;
chr(8660)&hArr;
chr(8704)&forall;
chr(8706)&part;
chr(8707)&exist;
chr(8709)&empty;
chr(8711)&nabla;
chr(8712)&isin;
chr(8713)&notin;
chr(8715)&ni;
chr(8719)&prod;
chr(8721)&sum;
chr(8722)&minus;
chr(8727)&lowast;
chr(8730)&radic;
chr(8733)&prop;
chr(8734)&infin;
chr(8736)&ang;
chr(8743)&and;
chr(8744)&or;
chr(8745)&cap;
chr(8746)&cup;
chr(8747)&int;
chr(8756)&there4;
chr(8764)&sim;
chr(8773)&cong;
chr(8776)&asymp;
chr(8800)&ne;
chr(8801)&equiv;
chr(8804)&le;
chr(8805)&ge;
chr(8834)&sub;
chr(8835)&sup;
chr(8836)&nsub;
chr(8838)&sube;
chr(8839)&supe;
chr(8853)&oplus;
chr(8855)&otimes;
chr(8869)&perp;
chr(8901)&sdot;
chr(8968)&lceil;
chr(8969)&rceil;
chr(8970)&lfloor;
chr(8971)&rfloor;
chr(9001)&lang;
chr(9002)&rang;
chr(9674)&loz;
chr(9824)&spades;
chr(9827)&clubs;
chr(9829)&hearts;
chr(9830)&diams;
Continue reading →

Labels