Skip to content

Instantly share code, notes, and snippets.

🇨🇿

Josef Šimánek simi

🇨🇿
Block or report user

Report or block simi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@simi
simi / Gemfile
Last active Mar 13, 2019
rails6 upsert example
View Gemfile
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: 'rails/rails', ref: '1816c4f'
gem "pg"
View final.yml
version: '3'
services:
web:
build: .
command: 'bin/rails s -b 0.0.0.0'
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
View template.rb
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 Feb 10, 2019 — forked from skanev/rubocop.rb
A Rubocop wrapper that checks only added/modified code
View rubocop.rb
#!/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:
#
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
menuOpened: true,
showModal: false
});
View controllers.application.js
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); },
View test.rb
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'
gem 'rails', '4.2.5'
View amd.txt
'amd eyefinity', 'Amd eyefinity', 'aMd eyefinity', 'AMd eyefinity', 'amD eyefinity', 'AmD eyefinity', 'aMD eyefinity', 'AMD eyefinity', 'amd Eyefinity', 'Amd Eyefinity', 'aMd Eyefinity', 'AMd Eyefinity', 'amD Eyefinity', 'AmD Eyefinity', 'aMD Eyefinity', 'AMD Eyefinity', 'amd eYefinity', 'Amd eYefinity', 'aMd eYefinity', 'AMd eYefinity', 'amD eYefinity', 'AmD eYefinity', 'aMD eYefinity', 'AMD eYefinity', 'amd EYefinity', 'Amd EYefinity', 'aMd EYefinity', 'AMd EYefinity', 'amD EYefinity', 'AmD EYefinity', 'aMD EYefinity', 'AMD EYefinity', 'amd eyEfinity', 'Amd eyEfinity', 'aMd eyEfinity', 'AMd eyEfinity', 'amD eyEfinity', 'AmD eyEfinity', 'aMD eyEfinity', 'AMD eyEfinity', 'amd EyEfinity', 'Amd EyEfinity', 'aMd EyEfinity', 'AMd EyEfinity', 'amD EyEfinity', 'AmD EyEfinity', 'aMD EyEfinity', 'AMD EyEfinity', 'amd eYEfinity', 'Amd eYEfinity', 'aMd eYEfinity', 'AMd eYEfinity', 'amD eYEfinity', 'AmD eYEfinity', 'aMD eYEfinity', 'AMD eYEfinity', 'amd EYEfinity', 'Amd EYEfinity', 'aMd EYEfinity', 'AMd EYEfinity', 'amD
@simi
simi / example.feature
Created Sep 26, 2015
basic login feature
View example.feature
Feature: Security
In order to see my projects
As a client
I want to be able to login via form
Scenario: Valid login
Given I'm not logged in
And I have account
When I fill in login form with valid credentials
Then I will be logged in
View Makefile
JCC = javac
JFLAGS = -g
JCP = -cp .:./boilerpipe-1.2.0.jar:./lib/xerces-2.9.1.jar:./lib/nekohtml-1.9.13.jar
JAVA = java
default: TestArticleExtractor.class
TestArticleExtractor.class: TestArticleExtractor.java
$(JCC) $(JFLAGS) $(JCP) TestArticleExtractor.java
You can’t perform that action at this time.