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
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.uix.widget import Widget | |
from kivy.core.image import Image | |
from kivy.properties import ObjectProperty | |
Builder.load_string(""" | |
<BackgroundTest>: | |
canvas: |
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/expect | |
log_user 0 # supress output | |
switch -regexp [llength $argv] { | |
[0,1] { | |
puts "Usage: geofix lng lat \[port\]" | |
exit | |
} | |
3 { set port [lindex $argv 2] } |
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
public class Unit { | |
public Unit(EventDispatcher dispatcher) { | |
dispatcher.addHandler(MyEvent.class, new IEventHandler() { | |
public void onEvent(MyEvent event) { | |
// some behavior | |
} | |
}); | |
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
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi | |
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)$(svn_prompt_info)%(!.#.») ' | |
RPROMPT='[%*]' | |
# git prompt styling | |
ZSH_THEME_GIT_PROMPT_PREFIX="[git:%{$fg_bold[white]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}] " | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡%{$reset_color%}] " |
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() { | |
var socket = io.connect('/speaker'); | |
socket.on('connect', function() { | |
// send session to server | |
socket.emit('join', { session_id: session.get('id') }); | |
socket.on('join.success', function(data) { | |
$(document).on('deck.change', slideChange); | |
}); |
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
var socket = io.connect('/global'); | |
socket.on('server-news', function(data) { | |
console.log(data.i); | |
socket.emit('client-news', { i: data.i + 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
quicksort [] = [] | |
quicksort (x:xs) = | |
quicksort [ y | y <- xs, y < x ] ++ | |
[x] ++ | |
quicksort [ y | y <- xs, y >= x ] |
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
@=~ | |
~p maximum_input_line_length = infinity | |
~O~<Test.gla~>~{ | |
Ident: C_IDENTIFIER | |
~} | |
~O~<Test.con~>~{ | |
Test: foo bar. | |
bar: '-'+. |
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
define([ | |
'underscore' | |
], function(_) { | |
var Fixtures = (function() { | |
var _timezones; | |
_timezones = <%= ActiveSupport::TimeZone::zones_map.to_json %>; | |
return { |
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
# Is it possible with the current streama DSL to explicitly say that the verb is not the identifier? | |
activity :created_event do | |
actor :user, :cache => [:username, :slug] | |
verb :post | |
object :event, :cache => [:name, :acronym, :slug] | |
end | |
# The combination of actor, verb, object (and target) has implicit and unique representation of the activity | |
# => maybe the identifier can be ommitted? | |
activity do |