Skip to content

Instantly share code, notes, and snippets.

View jonathan-bird's full-sized avatar

Jonathan Bird jonathan-bird

View GitHub Profile
@jamesmacwhite
jamesmacwhite / office-365-owa-anchors.html
Last active May 1, 2018 02:54
Styling anchors in Office 365 (OWA). What a pain in the @$$!
<!--
A standard anchor in your email campaign
How Office 365 (OWA) renders it:
** Anchor colour isn't applied and uses default colour state of the browser the email is viewed in
** Link underline is present and is the same colour as the default colour state of the browser viewed in
-->
<a href="http://github.com" style="color:#ff0000; text-decoration:none;">Awesome Sauce</a>
@Zodiac1978
Zodiac1978 / .htaccess
Last active May 3, 2024 12:11
Safer WordPress with these .htaccess additions
# Don't show errors which contain full path diclosure (FPD)
# Use that line only if PHP is installed as a module and not per CGI
# try using a php.ini in that case.
# Change mod_php5.c to mod_php7.c if you are running PHP7
<IfModule mod_php5.c>
php_flag display_errors Off
</IfModule>
# Don't list directories
<IfModule mod_autoindex.c>
@JamieMason
JamieMason / unfollow.js.md
Last active May 16, 2024 03:26
Unfollow everyone on twitter.com

Unfollow everyone on twitter.com

  1. Go to https://twitter.com/YOUR_USER_NAME/following
  2. Open the Developer Console. (COMMAND+ALT+I on Mac)
  3. Paste this into the Developer Console and run it
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
@kdabir
kdabir / DecimalFormatExample.java
Created February 23, 2012 05:45
Using DecimalFormat in java/groovy
import java.text.DecimalFormat;
...
DecimalFormat df = new DecimalFormat("###,##0.00");
df.format(number);
// in the format string,
// # -> shows Digit if present else blank
// 0 -> shows Digit if present else 0
// details at : http://docs.oracle.com/javase/6/docs/api/java/text/DecimalFormat.html