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
#!/usr/bin/env zsh | |
BASE=${0%/*} | |
SQLITE=/usr/bin/sqlite3 | |
echo "Extracting from OmniFocus" | |
$BASE/of-store --debug --out=$BASE/finished.db | |
$BASE/kanban-fetch --debug --out=$BASE/inprogress.db | |
echo "Exporting to tasks.csv" |
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
// See: https://devforums.apple.com/message/1000934#1000934 | |
import Foundation | |
// Logic | |
operator prefix ¬ {} | |
@prefix func ¬ (value: Bool) -> Bool { | |
return !value | |
} |
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
# Terms aggregations | |
POST reuters/_search | |
# aggregate on places - how many articles per country? | |
POST reuters-test/_search | |
{ | |
"size": 0, | |
"aggregations": { | |
"class": { |
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
Producer | |
Setup | |
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1 | |
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3 | |
Single thread, no replication | |
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196 |
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
// Credits to Phillip Gruneich, Brett Terpstra and Jonathon Duerig. | |
// This bookmarklet requires Drafts by Greg Pierce/Agile Tortoise. | |
javascript:(function()%7Bvar%20request=new%20XMLHttpRequest();request.open(%22GET%22,%22http://heckyesmarkdown.com/go/?read=1&preview=0&showframe=0&output=url&u=%22+encodeURIComponent(location.href),true);request.send();request.onreadystatechange=function()%7Blocation.href=%22drafts://x-callback-url/create?text=%22+request.responseText+%22&action=Markdown%20to%20Evernote%22%7D;%7D)(); | |
// Version without triggering the Markdown to Evernote action on Drafts | |
javascript:(function()%7Bvar%20request=new%20XMLHttpRequest();request.open(%22GET%22,%22http://heckyesmarkdown.com/go/?read=1&preview=0&showframe=0&output=url&u=%22+encodeURIComponent(location.href),true);request.send();request.onreadystatechange=function()%7Blocation.href=%22drafts://x-callback-url/create?text=%22+request.responseText%7D;%7D)(); |
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
set stateMent to do shell script "defaults read com.apple.finder AppleShowAllFiles" | |
if stateMent = "TRUE" then | |
do shell script "defaults write com.apple.finder AppleShowAllFiles FALSE" | |
else | |
do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE" | |
end if | |
tell application "Finder" to quit | |
delay 2 | |
launch application "Finder" |
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
javascript:window.location='drafts://x-callback-url/create?text='+encodeURIComponent(document.title+'\n\n')+'%5B'+encodeURIComponent(document.title)+'%5D('+encodeURIComponent(location.href)+')'+encodeURIComponent('\n\n>'+window.getSelection())+'&action=postachio&x-success='+encodeURIComponent(location.href); |
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
property theHome : path to home folder as string | |
set base1 to POSIX path of theHome & "Copy/" | |
set base2 to POSIX path of theHome & "Documents/PDFs/" | |
tell application "Skim" | |
set pdfTitle to name of document 1 | |
set customurl to "pdfpen:///" & pdfTitle & "?pg=" | |
set notePage to index of current page of document 1 | |
set theURL to customurl & notePage | |
set filePath to path of document 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
#!/usr/bin/ruby | |
############################################################################## | |
### getpinboard.rb by Brett Terpstra, 2011 <http://brettterpstra.com> | |
### Retrieves Pinboard.in bookmarks, saves as local .webloc files for | |
### Spotlight searching. | |
### | |
### Optionally adds OpenMeta tags and/or saves page as PDF (see config below) | |
### Use -r [NUMBER OF DAYS] to reset the "last_checked" timestamp (primarily | |
### for debugging). | |
### |
NewerOlder