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
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.1.1' # as well as '4.2.0' | |
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. |
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
begin | |
require 'bundler/inline' | |
rescue LoadError => e | |
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
raise e | |
end | |
gemfile(true) do | |
source 'https://rubygems.org' | |
# Activate the gem you are reporting the issue against. |
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
for (var i = 0, item; item = items[i]; i++) { | |
} |
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
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql |
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
ls -1 *.jpg | awk -F. '{printf "convert %s.jpg -resize 320x240 %s-sm.jpg\n",$1,$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
set :shared_database_path, "#{shared_path}/db" | |
set :shared_config_path, "#{shared_path}/config" | |
# snip... | |
after "deploy:setup", "sqlite3:make_shared_folder" | |
after "deploy:setup", "sqlite3:build_configuration" | |
after "deploy:symlink", "sqlite3:link_configuration_file" | |
# snip... |
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
$.post("http://mysite.com/users", | |
{ userId : 100, | |
name : "John", | |
lastName : "Boucher" }, | |
function(data) { | |
if (data.ok) { | |
alert("User saved!"); | |
} else { | |
alert("User NOT saved."); | |
} |
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
jskataUndo.onChange = function() { | |
// This is called when there's a new action | |
// or when undo/redo is called | |
}; |
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
jsk.undo.canUndo(); //returns false | |
jsk.undo.execute(function() {}, function() {}); | |
jsk.undo.canUndo(); //returns TRUE | |
jsk.undo.canRedo(); //returns false |
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
jsk.undo.execute(function addUser() { | |
alert("Add user"); | |
// code to add the user | |
}, | |
function removeUser() { | |
alert("Remove user"); | |
// code to remove the previously created user | |
} |
OlderNewer