rails new my_app --rc=template.rc -m template.rb
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
#!/usr/bin/env bash | |
# At each invocation of this script, this script cycles through the next config from ~/.config/hypr/monitor-config/ | |
# directory and symlinks it to ~/.config/hypr/monitor-config.nix | |
if [ -f ~/.config/hypr/monitor-config.conf ]; then | |
CURRENT_CONFIG="$(readlink ~/.config/hypr/monitor-config.conf)" | |
NEXT_CONFIG=$(find ~/.config/hypr/monitor-config/*.conf | grep -A 1 "$CURRENT_CONFIG" | tail -n 1) | |
# if next config is the same as the current, start from the beginning of the list |
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
version: '3.7' | |
services: | |
app: | |
image: registry.gitlab.com/timvisee/send:latest | |
volumes: | |
- uploads:/uploads | |
ports: | |
- published: 1443 | |
target: 1443 |
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
<div id="categories" data-controller="persist-scroll-position" data-action="scroll->persist-scroll-position#persist:passive" class="flex-auto flex flex-col gap-4 overflow-y-auto"> | |
... | |
</div> |
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
require 'rails_helper' | |
RSpec.feature 'Feature', js: true do | |
include InteractionHelper | |
scenario 'Scenario' do | |
visit '/' | |
hover_mouse(find('div#id')) do | |
click_on 'Button' |
I hereby claim:
- I am sevos on github.
- I am sevos (https://keybase.io/sevos) on keybase.
- I have a public key ASAnWvwdcqTcBoAhocP3U5ugAXF9rJMkfsh7RVo9CDcOjAo
To claim this, I am signing this object:
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
# TODO: ValueObject should be immutable. Setter should return new instance. | |
class ValueObject < Struct | |
def self.new(*fields) | |
all_fields, optional_fields = if fields.last.is_a?(Hash) | |
optional_fields = fields.pop | |
[fields + optional_fields.keys, optional_fields] | |
else | |
[fields, {}] | |
end |
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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
Person = Struct.new(:name, :email) do | |
def activate | |
`git config user.name '#{name}'` | |
`git config user.email '#{email}'` | |
end | |
end |
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
require 'spec_helper' | |
require 'timebacus/use_cases/report_activity' | |
describe Timebacus::ReportActivity do | |
context 'with valid data' do | |
let(:activity) { mock(id: 5, duration: 1800, description: 'remote work') } | |
mock_const Timebacus::ReportActivity, 'Activity' do |activity_class| | |
activity_class.stub(new: activity) |
This gist show problem with Ruby 1.9.3 on my Mac OS X Lion (10.7.2).
I've tried RVM and Rbenv+ruby-build. I tried linking with system openssl, rvm-openssl and homebrew-openssl. Even if linking succeeded, the error when requiring digest/sha1 appeared.
Problem with requiring digest/sha1 causes bundler not working at all.
This gist contains:
- test_1.9.2.txt - shows success on 1.9.2
- test_1.9.3.txt - shows failure on 1.9.3
NewerOlder