Skip to content

Instantly share code, notes, and snippets.

@nbudin
nbudin / initToolboxCategories.js
Last active August 13, 2019 13:23
Toolbox categories without going through BlocklyHelper
this.state = { toolboxCategories: [
{
"name": "Logic",
"colour": "#5C81A6",
"blocks": [
{
"type": "controls_if"
},
{
"fields": {

Keybase proof

I hereby claim:

  • I am nbudin on github.
  • I am nbudin (https://keybase.io/nbudin) on keybase.
  • I have a public key ASB1M4rvAA17Fh8wiug7MbVb9QI_yK_jNPoJ8pG2ZLnagwo

To claim this, I am signing this object:

@nbudin
nbudin / keybase.md
Created July 17, 2017 19:17
Keybase proof

Keybase proof

I hereby claim:

  • I am nbudin on github.
  • I am nbudin (https://keybase.io/nbudin) on keybase.
  • I have a public key ASBnTUJwl43EfPeiqWzI2k36JMS7iFeiAEb_TYzAxlnXPgo

To claim this, I am signing this object:

@nbudin
nbudin / 0_reuse_code.js
Created May 12, 2016 14:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@nbudin
nbudin / sti_through_bug.rb
Created June 17, 2014 16:59
Failing ActiveRecord test
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
@nbudin
nbudin / bind_filter_bug.rb
Created May 12, 2014 21:53
Test case for ActiveRecord filter_binds issue on Rails master
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'pg'
GEMFILE
system 'bundle'
end
@nbudin
nbudin / bind_filter_bug.rb
Created May 12, 2014 21:20
Test case for ActiveRecord filter_binds bug
# Activate the gem you are reporting the issue against.
gem 'activerecord', '4.1.1'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
Warden::Strategies.add(:openid) do
def valid?
!params["openid_identifier"].blank?
end
def authenticate!
if resp = env[Rack::OpenID::RESPONSE]
RAILS_DEFAULT_LOGGER.info "Attempting OpenID auth: #{env["rack.openid.response"].inspect}"
case resp.status
when :success
[submodule "octopi"]
path = octopi
url = git://github.com/fcoury/octopi.git