Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
Enter this in the search box along with your search terms:
Get all gists from the user santisbon.
user:santisbon
Find all gists with a .yml extension.
extension:yml
Find all gists with HTML files.
language:html
if (typeof exports === 'undefined') exports = {} | |
function timer (repeats, func, delay) { | |
var args = Array.prototype.slice.call(arguments, 2, -1) | |
args.unshift(this) | |
var boundFunc = func.bind.apply(func, args) | |
var operation = $.NSBlockOperation.blockOperationWithBlock(boundFunc) | |
var timer = $.NSTimer.timerWithTimeIntervalTargetSelectorUserInfoRepeats( | |
delay / 1000, operation, 'main', null, repeats | |
) |
/*Customise Safari Web Inspector font*/ | |
/*(tested on Safari 7.0.1 on OS X Mavericks)*/ | |
/* Tested on Safari 9.1 (11601.5.17.1) on OSX 10.11.4 as of 2016-05-08 */ | |
/* | |
JMichaelTX NOTE: | |
- This process was written for Safari 7 (Mavericks) | |
- I found it worked fine with Safari 9.1 (11601.5.17.1) on OSX 10.11.4, with just a few simple changes (noted below) | |
*/ |
------------------------------------------------------------------------------------------- | |
# Auth: Shane Stanley & Christopher Stone | |
# dCre: 2014/01/19 09:46 +1100 | |
# dMod: 2016/02/24 15:18 -0600 | |
# Appl: AppleScriptObjC | |
# Task: Create a date-string using ICU Date-Time Format Syntax | |
# : http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax | |
# Libs: None | |
# Osax: None | |
# Tags: @Applescript, @Script, @AppleScriptObjC, @ASObjC, @Shane, @Date, @String |
(function () { | |
'use strict'; | |
// OSX JavaScript for Applications lacks the persistent 'properties' | |
// of AppleScript (in which global variables and properties persist between script runs) | |
// but we can, of course, serialise to JSON or plist at the end of a script | |
// parsing it at the start of the next run. | |
// Here is one approach to persistence between script runs | |
// using JSON.stringify() and JSON.parse() |
set strJS to " | |
var xpathResults = document.evaluate('//*[@class=\\'r\\']/a', document, null, 0, null), | |
lst = [], | |
oNode; | |
while (oNode = xpathResults.iterateNext()) { | |
lst.push([ | |
'[', | |
oNode.text, | |
'](', |
// YOSEMITE Javascript for Applications JXA | |
// Capture the main result links from a Google search page as Markdown | |
// ( Using XPath to search for <a> elements which are children | |
// of elements with class 'r' | |
var resultLinksMD = function () { | |
var r = document.evaluate( | |
"//*[@class='r']/a", | |
document, null, 0, null | |
), |
function run() { | |
// Rob Trew 2015 | |
// Ver 0.01 | |
// UI day/night toggling through OS X 10.10 JXA Javascript for Automation | |
// SWITCH FROM DAY-TIME DARK MENU BAR AND DOCK WITH DARK BACKGROUND | |
// TO NIGHT-TIME *ALL DARK* | |
// (TOGGLE MODE AND BACKGROUND TO BRIGHT, THEN INVERT ALL) |