Skip to content

Instantly share code, notes, and snippets.

View MarkNijhof's full-sized avatar

Mark Nijhof MarkNijhof

View GitHub Profile
61 onEncoderChange : function(value) {
62 this.setState({selectedEncoder : value});
63 console.log("Encoder")
64 this.decideIfAssignDefaultIpButtonsDisabled();
65 },
66
67 onChannelChange : function(value) {
68 this.setState({selectedChannel : value});
69 console.log("Channel")
70 this.decideIfAssignDefaultIpButtonsDisabled();
We couldn’t find that file to show.
var server = ClientExpress.createServer();
server.configure(function() {
server.use(server.content_target_area("content"));
server.set('views', '/example/views/');
server.set('view engine', 'html');
server.register('.html', template_engine);
});
server.configure('development', function() {
@MarkNijhof
MarkNijhof / mongodb_initializer.rb
Created February 1, 2011 16:23
mongodb_initializer.rb
include MongoMapper
host = ENV['MONGODB_HOST']
port = ENV['MONGODB_PORT']
database = ENV['MONGODB_DATABASE']
username = ENV['MONGODB_USER_NAME']
password = ENV['MONGODB_PASSWORD']
MongoMapper.connection = Mongo::Connection.new(host || 'localhost',
port || 27017,
I have a weird issue with rails3
I have two models User and AuthenticationProvider, I also have a helper UserManager in the namespace Authentication::UserHelper. The UserManager uses both models
/app/
/models/
/User
/AuthenticationProvider
/helpers/
/authentication/
@MarkNijhof
MarkNijhof / gist:742605
Created December 15, 2010 21:03
compass.rb
require 'compass'
require 'compass/app_integration/rails'
Compass::AppIntegration::Rails.initialize!
Compass.configuration do |config|
config.project_path = File.dirname(__FILE__)
config.sass_dir = "app/stylesheets"
config.project_type = :rails
config.http_path = "/"
$blog_dorsey = Dorsey::Server.new do
set :article_path, './blog/articles'
set :article_prefix, "blog"
set :host, "http://cre8ivethought.com/"
set :disqus, "some_disqus_id"
set :date, lambda {|now| now.strftime("%B #{now.day.ordinal} %Y") }
end
@MarkNijhof
MarkNijhof / gist:720951
Created November 30, 2010 01:09
index.haml
- for article in @blog_dorsey.articles.select{|item| item[:published] }[0...5]
= haml :'_article_heading', :layout => false, :article => article <<< passing article to the second partial view?
task :spec do
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:client) do |t|
t.pattern = "spec/**/*_spec.rb"
end
end
@MarkNijhof
MarkNijhof / example_0.htm
Created November 10, 2010 21:52
Example_1.js
<script type="text/javascript">
function submit_form() {
$('#form_abc').submit();
}
</script>
<!-- Some other HTML or something else //-->
<script type="text/javascript">
function submit_form() {