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.makeSearchCommand({ | |
name: "pickaxe", | |
url: "http://www.google.com/search?q=site:http://whytheluckystiff.net/ruby/pickaxe/%20{QUERY}&btnG=Search&btnI=3564", | |
icon: "http://whytheluckystiff.net/favicon.ico", | |
description: "Searches 'Programming Ruby The Pragmatic Programmer's Guide' for your words.", | |
preview: function(pblock, directObject) { | |
var searchTerm = directObject.text; | |
var pTemplate = "Searches 'Programming Ruby The Pragmatic Programmer's Guide' for ${query}"; | |
var pData = {query: searchTerm}; | |
pblock.innerHTML = CmdUtils.renderTemplate(pTemplate, pData); |
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
grammar org.json.Json with org.eclipse.xtext.common.Terminals | |
generate json "http://www.json.org/" | |
Object: | |
'{' ((members+=Member) (',' members+=Member)*)? '}'; | |
Member: | |
key=STRING ':' value=Value; | |
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
refname="$1" | |
oldrev="$2" | |
newrev="$3" | |
# Find out revision of master | |
masterref=`git show-ref --hash --heads master` | |
# Find out common merge base of master and the checked in revision. | |
mergebase=`git merge-base $masterref $newrev` | |
if [[ $mergebase != $masterref && ( $refname == *development* || $refname == *feature* ) ]] | |
then | |
echo "Cannot push changes. Merge base is $mergebase, master is $masterref. Please type 'git pull origin master' and merge any conflicts first before$ |
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
' Slightly modified from http://www.pptfaq.com/FAQ00352_Batch_Insert_a_folder_full_of_pictures-_one_per_slide.htm | |
Sub InsertImages() | |
Dim strTemp As String | |
Dim strPath As String | |
Dim strFileSpec As String | |
Dim oSld As Slide | |
Dim oPic As Shape | |
' Edit these to suit: |
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
/* | |
* Grammar to generate an S-Expressions parser for Javascript using http://pegjs.majda.cz/ | |
*/ | |
start | |
= expression* | |
integer "integer" | |
= digits:[0-9]+ { return parseInt(digits.join(""), 10); } |
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 MySwingDomain._ | |
object Gui extends ReactiveSwingApp { | |
val button = new MyButton("test") | |
def top = new MainFrame { | |
contents = new FlowPanel { | |
contents += button | |
} | |
} |
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 MySwingDomain._ | |
object Gui extends ReactiveSwingApp { | |
val button = new MyButton("test") | |
def top = new MainFrame { | |
contents = new FlowPanel { | |
contents += button | |
} | |
} |
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 com.google.appsscript.adwords._ | |
import com.google.appsscript.base.Logger | |
import com.google.appsscript.spreadsheet._ | |
object ScalaJSExample extends js.JSApp{ | |
def main(): Unit = { | |
val adsIterator = AdWordsApp.ads() | |
.withCondition("ApprovalStatus = DISAPPROVED") | |
.get() |
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 ComparisonChain._ | |
import java.io.BufferedInputStream | |
import java.io.BufferedOutputStream | |
import java.io.BufferedReader | |
import java.io.BufferedWriter | |
import java.io.Closeable | |
import java.io.File | |
import java.io.File | |
import java.io.FileInputStream | |
import java.io.FilenameFilter |
OlderNewer