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(){ | |
let dt3 = Application("DEVONthink 3"); | |
dt3.includeStandardAdditions = true; | |
var sel = dt3.windows()[0].selectedText() | |
if (sel) { | |
sel = sel.replace(/ +and +/, " ") | |
sel = sel.replace(/ +och +/, " ") | |
sel = sel.replace(/ +& +/, " ") | |
sel = sel.replace(/, +/, " ") |
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(){ | |
let dt3 = Application("DEVONthink 3"); | |
dt3.includeStandardAdditions = true; | |
let se = Application("System Events") | |
let p = se.processes.byName("DEVONthink 3") | |
let win = dt3.windows()[0] | |
let toggle = p.menuBars.at(0).menuBarItems.byName("Tools").menus.byName("Tools") | |
.menuItems.byName("Inspectors").menus.byName("Inspectors").menuItems()[0] |
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
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
use framework "Foundation" | |
tell application "DEVONthink 3" | |
set theGroup to root of front window | |
set theRecordTags to tags of children of theGroup & tags of children of children of theGroup & tags of children of children of children of theGroup & tags of children of children of children of children of theGroup | |
set theDelims to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to ASCII character 0 | |
set theTags to text items of (theRecordTags as string) |
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
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); | |
/* TABS on bottom */ | |
#navigator-toolbox toolbar:not(#nav-bar):not(#toolbar-menubar) { | |
-moz-box-ordinal-group: 10; | |
} | |
#TabsToolbar { | |
-moz-box-ordinal-group: 1000 !important; | |
-moz-appearance: none !important; | |
background: url(chrome://browser/skin/Toolbar-background-noise.png) hsl(0,0%,83%) !important; |
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
Debugger entered--Lisp error: (wrong-type-argument characterp "Fabians anteckningar 22 mars.pdf") | |
mapconcat(#[257 "\2119\203 \300!\207\211\247\203\301!\207\207" [symbol-name number-to-string] 3 "\n\n(fn I)"] (("Fabians anteckningar 22 mars.pdf") ("Forelasning 29 mars 1861-1917.pdf") ("Forelasning 5 april Sovjetunionens uppgang och fall.pdf") ("Forelasning Den aldsta ryska historien 1 feb.pdf") ("Forelasning Ikoner 22 mars.pdf") ("Forelasning Introduktion 25 jan.pdf") ("Forelasning Katarina II - 1800-talets forsta halft 15 feb.pdf") ("Forelasning Ryskt 1600-tal 8 feb.pdf") ("Forelasning Ryskt 1700-tal Peter den store 8 feb.pdf") ("Musikhistoria Ryssland Uppsala 2017 Musiklista.pdf") ("Naverbrev-Novgorod.pdf") ("Tentamen 151127.pdf") ("Tentamen 160513.pdf") ("Tentamen 161214.pdf") ("tenta-1.org")) "\n") | |
helm-init-candidates-in-buffer(global (("Fabians anteckningar 22 mars.pdf") ("Forelasning 29 mars 1861-1917.pdf") ("Forelasning 5 april Sovjetunionens uppgang och fall.pdf") ("Forelasning Den aldsta ryska |
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
; MathLayer.ahk | |
; Created by John Ankarström (jocap) | |
; Inspired by Steve Losh: http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#math | |
; Compatible with US key layout | |
; Todo: Caps Lock support | |
; Issues: Selecting with LShift + arrow keys doesn't work great, RShift + arrow keys doesn't work at all | |
global MathMode := 0 |
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 draw_line_between(ax, ay, bx, by) | |
{ | |
var comp_x = ax - bx | |
var comp_y = ay - by | |
var _angle = Math.atan(comp_y/comp_x)*180/Math.PI // Yes, I like my angles in degrees... | |
var _distance = Math.sqrt(Math.abs(comp_x*comp_x + comp_y*comp_y)) | |
var div = document.createElement("div") | |
var Dy = Math.cos((180-90-_angle)*(Math.PI/180))*(_distance/2); | |
var Dx = Math.sin((90-(180-_angle)/2)*(Math.PI/180))*Math.sin((_angle/2)*(Math.PI/180))*(_distance) | |
document.getElementsByTagName("body")[0].appendChild(div) |
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
@echo off | |
set /a c=1 | |
setlocal ENABLEDELAYEDEXPANSION | |
for /f "usebackq delims=|" %%f in (`dir /b "E:\Documents\ArmA 2 Other Profiles\JohnAJ\missions"`) do ( | |
set files[!c!]=%%f | |
echo !c!, %%f | |
set /a c+=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
get '/archive' do | |
@articles = Article.all :limit => 10, :order => 'created_at' | |
erb :articles # or haml, whatever | |
end | |
get '/archive/:permalink' do |permalink| | |
@article = Article.first :permalink => permalink | |
erb :article | |
end |
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
def text(text, htmloutput = true) | |
if htmloutput | |
return text.rm_ln | |
else | |
return text.rm_ln! | |
end | |
end |
NewerOlder