Skip to content

Instantly share code, notes, and snippets.

@sgraber
sgraber / gist:864968
Created March 10, 2011 21:29 — forked from benvinegar/gist:414837
Disqus Comments Reload
<!-- You'll need to call get_disqus_num_replies() every time you alter the content (ex - ajax) -->
<script type="text/javascript">
//<![CDATA[
var get_disqus_num_replies = function() {
var links = document.getElementsByTagName('a');
var query = '?';
for(var i = 0; i < links.length; i++) {
if(links[i].href.indexOf('#disqus_thread') >= 0) {
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
}
@sgraber
sgraber / ScalePictures40.vb
Created February 8, 2018 14:30 — forked from kristopherjohnson/ScalePictures40.vb
Microsoft Word macro to resize all pictures in a document to 40% of original size
Sub ScalePictures40()
Dim i As Long
With ActiveDocument
For i = 1 To .InlineShapes.Count
With .InlineShapes(i)
.ScaleHeight = 40
.ScaleWidth = 40
End With
Next i
End With