Skip to content

Instantly share code, notes, and snippets.

View khustochka's full-sized avatar
🇺🇦
Stand with Ukraine!

Vitalii Khustochka khustochka

🇺🇦
Stand with Ukraine!
View GitHub Profile
@khustochka
khustochka / main-user.sh
Last active January 2, 2022 00:57
Create you own user on AWS Ubuntu or Raspberry Pi
#!/bin/bash
set -e
username=$1
new_uid=$2
new_groups=$3
while [ -z "$username" ]
do
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails"
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails"
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", "6.0.2"
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails"
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", github: "rails/rails"
# frozen_string_literal: true
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
[1] pry(main)> RUBY_VERSION
=> "2.1.0"
[2] pry(main)> require 'active_support/hash_with_indifferent_access'
=> true
[3] pry(main)> h = ActiveSupport::HashWithIndifferentAccess.new({a: 1})
=> {"a"=>1}
[4] pry(main)> x = h.reject {|_, v| v.nil? }
=> {"a"=>1}
[5] pry(main)> x.class
=> ActiveSupport::HashWithIndifferentAccess
@khustochka
khustochka / gist:8071697
Last active January 1, 2016 01:19
Active record failure, 4.1.0.beta1
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'sqlite3'
GEMFILE
system 'bundle'
end
Register der wissenschaftlichen Artbezeichnungen
R - голос, G - песня, J/JR - голоса молодых, K - щелканье клювом, F - звуки крыльев
Accipiter badius 3/56
Accipiter brevipes 3/57
Accipiter gentilis 3/52-53
Accipiter nisus 3/54-55
Acridotheres tristis 10/27