This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Add references in Excel | |
' * Microsoft XML, v6.0 | |
' * Microsoft Script Control 1.0 | |
Option Explicit | |
Private ScriptEngine As ScriptControl | |
Public Function GetWebSource(ByRef URL As String) As String | |
Dim xml As IXMLHTTPRequest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function move_duckduckgo(){ | |
var node = document.getElementById('ddg_zeroclick'); | |
if(node != null){ | |
document.getElementById('rhs').appendChild(node); | |
} else { | |
setTimeout(move_duckduckgo, 10); | |
} | |
} | |
move_duckduckgo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<table width='100%'> | |
<tr> | |
<td>Select a TestTemplate File to Load:</td> | |
<td><input type="file" id="fileToLoad"> | |
<td><a href="javascript:loadFileAsText()">Load Selected File</a><td> | |
</tr> | |
<tr> | |
<td colspan="3"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'parslet' | |
#This needs a few more 'as' calls to annotate the output | |
class JSONParser < Parslet::Parser | |
def initialize(number_parser) | |
@number_parser | |
end | |
rule(:space) { match('[\s\n]').repeat(1)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li class='step'> | |
<%= sf.hidden_field :id %> | |
<%= sf.hidden_field :step_definition_id %> | |
<%= sf.hidden_field :position ,:class=>"position"%> | |
<%= sf.object.format_with_params { |param| render(:partial=>'scenarios/param' , :locals=>{:param=> param, :sf=>sf})} %> | |
<% if sf.object.new_record? %> | |
<%= link_to "Remove", '#', :onclick =>"$(this).parent('.step').remove()" %> | |
<% else %> | |
<%= sf.check_box '_destroy' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class While | |
def initialize(&src_fn) | |
@src_fn = src_fn | |
end | |
def do | |
x = @src_fn.call | |
while(x) | |
yield(x) | |
x = @src_fn.call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' You need to make a mail folder called "Archive" for the emails to move into, and add this email to your menu bar and call it "&[Archive" | |
' You also need to open an email and add the macro to your quickbar (I expect it to be item 6, which you can check by typing 'alt') | |
Sub Archive() | |
Dim myItem | |
If TypeName(Application.ActiveWindow) = "Inspector" Then | |
Set myItem = Application.ActiveWindow.CurrentItem | |
myItem.UnRead = False | |
myItem.Move (Application.GetNamespace("MAPI").Folders("Archive")) | |
Else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example script to collate and reduce size of scanned pdf. Idea taken from Stackoverflow answers | |
# interleave two pdfs as one | |
pdftk A=Emma\ front\ half.pdf B=Emma\ back\ half.pdf shuffle A B output Emma.pdf | |
# convert to postscript | |
pdf2ps Emma.pdf Emma.ps | |
# convert back with defined resolution 150 | |
ps2pdf -dPDFSETTINGS=/screen -dDownsampleColorImages=false -dColorImageResolution=150 -dColorImageDownsampleType=/Bicubic Emma.ps Emma_ps150b.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* knicked the Wait for load script from http://stackoverflow.com/questions/5525071/how-to-wait-until-an-element-exists */ | |
/* https://gist.github.com/buu700/4200601 */ | |
(function ($) { | |
/** | |
* @function | |
* @property {object} jQuery plugin which runs handler function once specified element is inserted into the DOM | |
* @param {function} handler A function to execute at the time when the element is inserted | |
* @param {bool} shouldRunHandlerOnce Optional: if true, handler is unbound after its first invocation |