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
CmdUtils.CreateCommand({ | |
name: "jquery", | |
preview: "Injects the latest version of jQuery into the current page.", | |
execute: function() { | |
var s=Application.activeWindow.activeTab.document.createElement('script'); | |
s.setAttribute('src','http://jquery.com/src/jquery-latest.js'); | |
Application.activeWindow.activeTab.document.getElementsByTagName('body')[0].appendChild(s); | |
displayMessage( "jQuery injected in current page"); | |
} | |
}); |
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
CmdUtils.CreateCommand({ | |
names: ["mdlink", "markdown link"], | |
arguments: [{role: "object", nountype: noun_arb_text, label: "search term"}], | |
preview: "Replaces the selected text with a Markdown link to the first Google result for that text.", | |
execute: function( args ) { | |
var baseUrl = "http://ajax.googleapis.com/ajax/services/search/web"; | |
var params = {v: "1.0", q: args.object.text}; | |
jQuery.getJSON( baseUrl, params, function( results ) { | |
CmdUtils.setSelection( "[" + args.object.text + "](" + results.responseData.results[0].url + ")" ); | |
}) |
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
module Main where | |
import Data.Maybe (fromJust) | |
import Data.List (nub, intersect) | |
import Control.Monad.Writer | |
-- Modules in topological order, i.e. | |
-- a module must appear after all of its | |
-- dependencies | |
dependencies = [ |
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
module Main where | |
import Data.Maybe (fromJust) | |
import Data.List (nub, intersect) | |
import Control.Monad.Writer | |
-- Modules in topological order, i.e. | |
-- a module must appear after all of its | |
-- dependencies | |
dependencies = [ |
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
[81 of 86] Compiling Yi.UI.Vty ( Yi/UI/Vty.hs, dist/build/Yi/UI/Vty.o ) | |
Yi/UI/Vty.hs:99:92: | |
Ambiguous occurrence `refresh' | |
It could refer to either `Yi.UI.Vty.refresh', defined at Yi/UI/Vty.hs:178:0 | |
or `Vty.refresh', imported from Graphics.Vty at Yi/UI/Vty.hs:42:0-25 | |
Yi/UI/Vty.hs:117:64: | |
Ambiguous occurrence `refresh' | |
It could refer to either `Yi.UI.Vty.refresh', defined at Yi/UI/Vty.hs:178:0 |
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 re | |
NOTE_NUMBERS = { | |
'A': 0, | |
'A#': 1, | |
'Bb': 1, | |
'B': 2, | |
'C': 3, | |
'C#': 4, | |
'Db': 4, |
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
(defstruct env | |
(width 2) | |
(height 1) | |
(x-pos 0) | |
(y-pos 0) | |
(dirt-vector (make-array 2)) | |
(moves-so-far 0)) | |
(defstruct agent | |
(name "A") |
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
;; agents.lisp | |
(defstruct env | |
(width 2) | |
(height 1) | |
(x-pos 0) | |
(y-pos 0) | |
(dirt-vector (make-array 2)) | |
(moves-so-far 0)) | |
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
<html> | |
<body> | |
Does this work? | |
</body> | |
</html> |
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
;; agents2.lisp | |
(defstruct env | |
(width 2) | |
(height 1) | |
(x-pos 0) | |
(y-pos 0) | |
(dirt-vector (make-array 2)) | |
(moves-so-far 0)) | |
OlderNewer