Skip to content

Instantly share code, notes, and snippets.

View simi's full-sized avatar
🇨🇿

Josef Šimánek simi

🇨🇿
View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
count: 0,
showInput: function() {
return this.get('count') > 2;
}.property('count'),
actions: {
increment: function() { this.set('count', this.count + 1); },
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
menuOpened: true,
showModal: false
});
@simi
simi / rubocop.rb
Created February 10, 2019 00:20 — forked from skanev/rubocop.rb
A Rubocop wrapper that checks only added/modified code
#!/usr/bin/env ruby
# A sneaky wrapper around Rubocop that allows you to run it only against
# the recent changes, as opposed to the whole project. It lets you
# enforce the style guide for new/modified code only, as opposed to
# having to restyle everything or adding cops incrementally. It relies
# on git to figure out which files to check.
#
# Here are some options you can pass in addition to the ones in rubocop:
#
after_bundle do
generate(:controller, 'home index', '--no-javascripts --no-stylesheets --no-helper')
remove_file 'app/views/home/index.html.erb'
create_file 'app/views/home/index.html.erb', <<-RUBY.chomp
<script>document.write('<h2>Hello from JS</h2>')</script>
RUBY
create_file 'test/system/home_test.rb', <<-RUBY.chomp
require "application_system_test_case"
version: '3'
services:
web:
build: .
command: 'bin/rails s -b 0.0.0.0'
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
@simi
simi / Gemfile
Last active March 13, 2019 09:39
rails6 upsert example
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: 'rails/rails', ref: '1816c4f'
gem "pg"
source 'https://rubygems.org'
ruby '2.7.0'
gem 'rack'
gem 'rack-test'
gem 'minitest'
count required_ruby_version
92222 >= 0
60103
2302 >= 1.9.3
2285 >= 2.0.0
1327 >= 2.3.0
900 >= 2.0
872 ~> 2.0
758 >= 1.9
744 >= 2.1.0
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index ca8032645..4e0d3971c 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -1188,6 +1188,8 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
# other.
class << self
+ attr_accessor :disable_system_update
+
Friend Class Convertor
Const EPS As Double = 1e-4 ' relative accuracy
' *
' Conversion from JTSK to WGS-84 (by iteration)
'
' @param x
' @param y
' @return array
'