sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
Pry.config.history.should_save = true | |
Pry.config.history.file = File.join(__dir__, '.pry_history') |
require "octokit" | |
client = Octokit::Client.new(access_token: "") | |
client.auto_paginate = true | |
client.organization_repositories('abak-press', type: 'all').each do |repo| | |
client.delete_subscription(repo.id) | |
client.forks(repo.id).each do |fork| | |
client.delete_subscription(fork.id) |
This python script is intended to automate the extraction of embedded certificates and keys from OpenVPN config files.
Unfortunately the GNOME Network-Manager is not able to automatically import OpenVPN config files with embedded certificates and keys. A workaround is to manually extract these and store them in separate files (e.g. see https://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/).
Instructions:
Make shure all the required packages are installed. For example on Ubuntu and Debian run:
$ sudo apt-get install python3 network-manager-openvpn-gnome
По мотивам статьи: https://habr.com/ru/post/354282/
Сервер, естественно, должен иметь IP, не входящий в заблокированные РКН подсети. Лучше — стоять вне РФ.
Желательно обеспечить базовый уровень безопасности: https://www.linode.com/docs/security/securing-your-server/
Или заморочиться: https://www.cisecurity.org/cis-benchmarks/
# frozen_string_literal: true | |
module CoreBy | |
module FieldExtensions | |
# GraphQL field extension allows returning URL of Active Storage attachment. | |
# TODO: Move to `graphql-field_attachment` gem? | |
class AttachmentUrlField < GraphQL::Schema::FieldExtension | |
attr_reader :attachment_assoc | |
def apply |
class MutationRoot < Common::GraphQL::MutationRoot | |
with_options authenticate: true do | |
field :create_direct_upload, mutation: Mutations::CreateDirectUpload | |
end | |
with_options authenticate: true, user_checks: {completed: true} do | |
field :follow_user, mutation: Mutations::FollowUser | |
field :unfollow_user, mutation: Mutations::UnfollowUser | |
end | |
end |
namespace :db do | |
namespace :bloat do | |
desc 'Поиск распухших таблиц' | |
task :tables => :environment do | |
redis = Redis::Namespace.new('db:bloat') | |
connection = ActiveRecord::Base.connection | |
connection.tables.each do |table_name| | |
begin | |
rows_counted = redis.hget('tables', table_name) |
raise "Remove patches below in Rails 7" if Rails::VERSION::MAJOR == 7 | |
Rake::Task["db:schema:load:statistics"]&.clear | |
Rake::Task["db:_dump:statistics"]&.clear | |
Rake::Task["db:schema:dump:statistics"]&.clear | |
Rake::Task["db:test:load_schema:statistics"]&.clear | |
namespace :db do | |
namespace :schema do | |
desc "Creates a database schema file (either db/schema.rb or db/structure.sql, depending on `config.active_record.schema_format`)" | |
task dump: :load_config do |
I was able to get Ruby 2.5.1 building on M1 by following two of the steps in that GH issue...
rbenv/ruby-build#1691 (comment) rbenv/ruby-build#1691 (comment)
I installed readline
and openssl
with standard brew install
.
brew install readline
brew install openssl