Skip to content

Instantly share code, notes, and snippets.

@emk
emk / gist:115584
Created May 21, 2009 17:34
wxScintilla LexLisp: More brackets
diff --git a/src/stc/scintilla/src/LexLisp.cxx b/src/stc/scintilla/src/LexLisp.cxx
index 8784e38..e1d06cb 100644
--- a/src/stc/scintilla/src/LexLisp.cxx
+++ b/src/stc/scintilla/src/LexLisp.cxx
@@ -32,7 +32,7 @@ using namespace Scintilla;
static inline bool isLispoperator(char ch) {
if (isascii(ch) && isalnum(ch))
return false;
- if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' )
+ if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == '{' || ch == '}')
public class MediaDemo implements EntryPoint {
String bulletHtml =
"<h3 style='display: none' id='special'>A special message</h3>" +
"<ul>" +
"<li style='display: none' id='miracles'>Modern medicine can work miracles</li>" +
"<li style='display: none' id='phony'>But there are also phony practitioners." +
" <ul>" +
" <li style='display: none' id='z-rays'>There are <i>no</i> Z-rays.</li>" +
" <li style='display: none' id='music'>You can't cure cancer with tape-recorded music.</li>" +
@emk
emk / rechoey.rb
Created September 5, 2009 11:28
A port of the Google Wave FedOne Echoey.java agent to Ruby
# Copyright 2009 Google Inc. (original Java code)
# Copyright 2009 Eric Kidd (Ruby translation)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# Viterbi POS tagger using numpy and some libraries I wrote.
#
# To use:
#
# >>> viterbi.pos_tag('i want to go for a run .')
# ['PPSS', 'VB', 'TO', 'VB', 'IN', 'AT', 'NN']
# >>> viterbi.pos_tag('i want to run .')
# ['PPSS', 'VB', 'TO', 'VB']
#
# -Eric Kidd
require File.join(File.dirname(__FILE__), '..', 'spec_helper')
class Workgroup
include MongoMapper::Document
many :people
end
class Person
include MongoMapper::Document
belongs_to :workgroup
INFO ~ Detected project change. Will rebuild manifest
INFO ~ Rebuilding project manifest
INFO ~ Serving sproutcore/tests:index.html
INFO ~ Serving sproutcore/testing:stylesheet.css
INFO ~ Serving sproutcore/debug:javascript.js
INFO ~ Serving sproutcore/foundation:stylesheet.css
INFO ~ Serving sproutcore/desktop:stylesheet.css
INFO ~ Serving sproutcore/standard_theme:stylesheet.css
INFO ~ Serving sproutcore/tests:stylesheet.css
INFO ~ Serving sproutcore/testing:javascript.js
When /^I am using my web app$/ do
selenium.remote_control_timeout_in_seconds = 200
selenium.open 'http://0.0.0.0:4020/mywebapp'
selenium.remote_control_timeout_in_seconds = 5
end
@emk
emk / gist:344447
Created March 26, 2010 03:12
Mysteriously failing SC.Animatable
showNotification: function () {
this.set('isVisible', YES);
this.disableAnimation();
this.adjust('opacity', 1).updateStyle(); // Avoid animation.
this.enableAnimation();
if (this._hideTimer)
this._hideTimer.invalidate();
this._hideTimer = SC.Timer.schedule({
target: this, action: 'hideNotification', interval: 2500
// The standard 'main' function.
MyApp.main = function main() {
// Step 1: Instantiate Your Views
// The default code here will make the mainPane for your application visible
// on screen. If you app gets any level of complexity, you will probably
// create multiple pages and panes.
MyApp.getPath('mainPage.mainPane').append() ;
@emk
emk / gist:390802
Created May 5, 2010 14:01
Bash completion setup for git
# This must appear at the end of .bash_profile.
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
# This must appear after we set up bash_completion. It gives us a
# git-aware prompt string in the shell.
PS1='\u@\h \W$(__git_ps1 " (%s)")\$ '