Skip to content

Instantly share code, notes, and snippets.

View simi's full-sized avatar
🇨🇿

Josef Šimánek simi

🇨🇿
View GitHub Profile
<body>
<script src="jtsk.js"></script>
Velbloud je na <span data-jstk-x="1043019.76" data-jstk-y="738380.15" id="adresa"></span>
<script>
text = document.getElementById("adresa");
x = parseFloat(text.dataset.jstkX);
y = parseFloat(text.dataset.jstkY)
prevod = new JTSK_Converter();
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
'
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
+
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
source 'https://rubygems.org'
ruby '2.7.0'
gem 'rack'
gem 'rack-test'
gem 'minitest'
@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"
version: '3'
services:
web:
build: .
command: 'bin/rails s -b 0.0.0.0'
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
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"
@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:
#
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
menuOpened: true,
showModal: false
});