This file contains hidden or 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
| set thePath to (path to desktop as Unicode text) & "ThingsToDo.txt" | |
| set thingsToDoFile to (open for access file thePath with write permission) | |
| set eof of thingsToDoFile to 0 | |
| set cr to ASCII character 10 | |
| tell application "Things" | |
| -- Export to-dos from Inbox | |
| write "Inbox:" & return to thingsToDoFile as «class utf8» | |
| repeat with td in to dos of list "Inbox" |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| SILENT = ENV['SL_SILENT'] =~ /false/i ? false : true || true | |
| VERSION = '2.2.23' | |
| # SearchLink by Brett Terpstra 2015 <http://brettterpstra.com/projects/searchlink/> | |
| # MIT License, please maintain attribution | |
| require 'net/https' | |
| require 'uri' |
This file contains hidden or 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
| <!doctype html> | |
| <html> | |
| <head> | |
| <style> | |
| /* ROLL LINKS */ | |
| .roll-link { | |
| display: inline-block; | |
| overflow: hidden; | |
| vertical-align: top; |
This file contains hidden or 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
| #covert an image in the clipboard to a 57x57 rgb icon and store base64 version of it into the clipboard. | |
| #if an image is not in the clipboard the base64 string 'b64str' will be loaded and displayed. | |
| #after running the 1st time replace the contents of b64str with the clipboard. | |
| from PIL import Image | |
| import clipboard | |
| from StringIO import * | |
| import base64 | |
| b64str=""" |
This file contains hidden or 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
| import requests | |
| USER_TOKEN = u'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' #replace with your user key | |
| APP_TOKEN = u'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' #replace with your APP token/key | |
| HEADERS = { "Content-type": "application/x-www-form-urlencoded" } | |
| def sendPush(message, title, url, url_title): | |
| parameters = { u'token': APP_TOKEN, | |
| u'user': USER_TOKEN, |
This file contains hidden or 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
| -- AppleScript -- | |
| -- This example is meant as a simple starting point to show how to get the information in the simplest available way. | |
| -- Keep in mind that when asking for a `return` after another, only the first one will be output. | |
| -- This method is as good as its JXA counterpart. | |
| -- Webkit variants include "Safari", "Webkit", "Orion". | |
| -- Specific editions are valid, including "Safari Technology Preview". | |
| -- "Safari" Example: | |
| tell application "Safari" to return name of front document |
This file contains hidden or 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
| #!/usr/bin/ruby | |
| # encoding: utf-8 | |
| # | |
| # Updated 2017-10-25: | |
| # - Defaults to large size (512) | |
| # - If ImageMagick is installed: | |
| # - rounds the corners (copped from @bradjasper, https://github.com/bradjasper/Download-iTunes-Icon/blob/master/itunesicon.rb) | |
| # - replace original with rounded version, converting to png if necessary | |
| # | |
| # Retrieve an iOS app icon at the highest available resolution |
This file contains hidden or 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
| # 1. Add some necessary libraries | |
| import scraperwiki | |
| import urllib2, lxml.etree | |
| # 2. The URL/web address where we can find the PDF we want to scrape | |
| url = 'http://cdn.varner.eu/cdn-1ce36b6442a6146/Global/Varner/CSR/Downloads_CSR/Fabrikklister_VarnerGruppen_2013.pdf' | |
| # 3. Grab the file and convert it to an XML document we can work with | |
| pdfdata = urllib2.urlopen(url).read() |
OlderNewer