Whe using rmagick
Linux:
Need install imagemagick6
PKG_CONFIG_PATH='/usr/lib/imagemagick6/pkgconfig' gem install rmagick -v '2.13.4'| # frozen_string_literal: true | |
| module Memoizable | |
| # Allows to define memoized methods with ease. | |
| # Usage: | |
| # | |
| # class SomeService | |
| # include Memoizable | |
| # | |
| # def initialize(customer_id) |
| # frozen_string_literal: true | |
| module Callable | |
| # Makes object callable. | |
| # Instance method #call must be defined. | |
| # Usage: | |
| # | |
| # class SomeService | |
| # include Callable | |
| # |
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH="/Users/denisoster/.oh-my-zsh" | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
| def scope_collection(collection, action = Auth::READ) | |
| # # scoping is appliable only to read/index action | |
| # # which means there is no way how to scope other actions | |
| # Pundit.policy_scope!(user, namespace(collection)) | |
| # rescue Pundit::NotDefinedError => e | |
| # if default_policy_class && default_policy_class.const_defined?(:Scope) | |
| # default_policy_class::Scope.new(user, collection).resolve | |
| # else | |
| # raise e | |
| # end |
| xkb_keymap { | |
| xkb_types { include "complete" }; | |
| xkb_compat { include "complete" }; | |
| xkb_symbols { include "pc+us+ru:2+inet(evdev)" }; | |
| xkb_geometry { include "pc(pc105)" }; | |
| xkb_keycodes { | |
| include "evdev+aliases(qwerty)" | |
| <LWIN> = 64; |
| #!/bin/bash | |
| game_id=$1 | |
| game_folder=$2 | |
| executable_file=$3 | |
| ### Checks | |
| if [ -z "$game_id" ] || [ -z "$game_folder" ] || [ -z "$executable_file" ]; then | |
| echo "Example: ./proton_exec.sh 211600 thief_gold \$HOME/executable_file.exe" |
How to Use Mixins and Modules in Your Ruby on Rails Application
Rails Concerns: To Concern Or Not To Concern
The Inherited Hook Method in Ruby - and More Parenting Lessons
Up the Ancestor Chain with method_missing
Unraveling Classes, Instances and Metaclasses in Ruby
Closures in Ruby: Blocks, Procs and Lambdas
Changing the Way Ruby Creates Objects
[Ruby's redo, retry and next k
| # | |
| # | |
| # /etc/libvirt/hooks/qemu.d/winnvme/prepare/begin/start.sh | |
| # | |
| # | |
| #!/bin/bash | |
| set -x | |
| # Stop display manager |
| # Maintainer: Morten Linderud <foxboron@archlinux.org> | |
| # Maintainer: David Runge <dvzrv@archlinux.org> | |
| # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> | |
| pkgbase=podman | |
| pkgname=(podman podman-docker) | |
| pkgver=4.1.1 | |
| pkgrel=3 | |
| pkgdesc='Tool and library for running OCI-based containers in pods' | |
| arch=(x86_64) |