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
fs = require 'fs' | |
cp = require 'child_process' | |
fs.readdir './', (err, files)-> | |
for file in files | |
if file.match /.*\.jade$/ | |
console.log 'watching: ', file | |
fs.watchFile file, persistent: true, (current, prev)-> | |
console.log 'compiling' |
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
assets = require 'connect-assets' | |
eco = require 'eco' | |
assets.jsCompilers.eco = | |
eco: | |
match: /\.eco$/ | |
compileSync: (sourcePath, source) -> | |
eco.compile source |
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
@delay_field.connect(SIGNAL 'textChanged(QString)') do |text| | |
puts text | |
end |
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
Thread ID: 84107270 | |
Total: 18446744071.877480 | |
%self total self wait child calls name | |
100.00 18446744071.88 18446744070.38 0.00 18446744071.88 15637 Array#each | |
0.00 18446744071.78 0.47 0.00 18446744071.78 296 Kernel#gem_original_require | |
0.00 0.18 0.18 0.00 0.00 129220 String#=== | |
0.00 0.21 0.12 0.00 0.08 3692 Gem::Version#<=> | |
0.00 0.08 0.08 0.00 0.00 15984 <Class::File>#file? | |
0.00 0.05 0.04 0.00 0.01 715 BasicObject#method_missing |
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
‹accessors› | |
╰─$ npm install 1 ↵ | |
> [email protected] install /home/dennis/dev/nodeirc/node-qt/node-qt | |
> node-gyp rebuild | |
info it worked if it ends with ok | |
spawn python [ '/home/dennis/.node-gyp/0.6.8/tools/gyp_addon', | |
'binding.gyp', | |
'-I/home/dennis/dev/nodeirc/node-qt/node-qt/build/config.gypi', |
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
require 'data_mapper' | |
require 'dm-postgres-adapter' | |
DataMapper.setup(:default, 'postgres:///foobar') | |
class Foo | |
include DataMapper::Resource | |
property :id, Serial | |
property :bar, String | |
end |
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
$('a[href]').click -> | |
$('.menu li').removeClass('active') | |
$(this).parent('li').addClass('active') | |
MissNk.profile_router.navigate $(this).attr('href'), trigger: true | |
false |
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
most_recent: (id)-> | |
@collection ||= new ProfileCollection | |
unless @collection.get(id) | |
@collection.fetch | |
success: => | |
if id | |
@display @collection.get(id) | |
else | |
@display @collection.first() | |
else |
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
def full_name | |
unless @_full_name | |
return @first_name + ' ' + @last_name | |
end | |
@_full_name | |
end | |
def full_name=(full_name) | |
@_full_name = full_name | |
end |
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
# Standard QtRuby: | |
Menu.new do | |
action = Action.new | |
action.text = 'say hi' | |
action.connect(SIGNAL :clicked) { puts 'hi' } | |
add_action(action) | |
action_quit = Action.new | |
action_quit.text = 'quit' |