irb
- command to launch ruby interpreter in any directory
rails c
- command lets you interact with your Rails application from the command line
reload!
- reload rails environment if you had changed model functionality
gem outdated
- show all outdated gems on project
gem update [<gem_name>]
- update a specific gem
./bin/webpack-dev-server
- start webpacker dev server for fast compiling
code $(bundle show gem_name)
- shortcut to open a Ruby gem in VS Code
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
FROM --platform=linux/amd64 ubuntu:18.04 | |
LABEL maintainer Synkevych Roman "[email protected]" | |
RUN apt-get update && apt-get install -y \ | |
language-pack-en openssh-server vim software-properties-common \ | |
build-essential make gcc g++ zlib1g-dev git python3 python3-dev python3-pip \ | |
gfortran autoconf libtool automake flex bison cmake git-core \ | |
libeccodes0 libeccodes-data libeccodes-dev libeccodes-tools \ | |
libnetcdff-dev unzip curl wget |
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
#!/bin/sh | |
echo "post-checkout hook will be executed" | |
# source rvm and .rvmrc if present | |
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" | |
[ -s "$PWD/.rvmrc" ] && . "$PWD/.rvmrc" | |
# rollback migrations if present | |
OLDBRANCH=$1 |
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
#!/bin/sh | |
changed_files=`git status --short` | |
if [ "$changed_files" ]; then | |
echo "There some changes:" | |
echo "$changed_files" | |
echo "please commit or reset them, before push." | |
exit 1 | |
else | |
echo "There no changes, move on to the next task" |
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 | |
require 'English' | |
require 'rubocop' | |
ADDED_OR_MODIFIED = /A|AM|^M/.freeze | |
changed_files = `git status --porcelain`.split(/\n/). | |
select { |file_name_with_status| | |
file_name_with_status =~ ADDED_OR_MODIFIED |
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
#!/bin/bash | |
echo "This is a script to try automatically configure all project dependencies basid on Rails framework." | |
# exit on the first error | |
set -e | |
echo "Check Ruby version" | |
required_ruby_version=$(cat .ruby-version) | |
current_ruby_version=`/usr/bin/ruby -e 'puts RUBY_VERSION'` |
whoami
current user name
hostname
current pc name
cat /etc/os-release
- info about current system
getent group sudo | cut -d: -f4
- show all sudo users
su - user2
- switch between users
sudo chmod a+rwx folderName/*
add all access to the folder
chown -R username directory
- add full permission directory and to all files and directories in that directory
chowd -R u+rX directory
- the same as previous
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
<!DOCTYPE html> | |
<html lang="en" > | |
<head> | |
<meta charset="UTF-8"> | |
<title>CodePen - Space 404</title> | |
<style> | |
html, | |
body { | |
height: 100%; | |
width: 100%; |
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
{"lastUpload":"2021-07-24T21:59:37.624Z","extensionVersion":"v3.4.3"} |
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
{"lastUpload":"2020-12-18T21:55:43.232Z","extensionVersion":"v3.4.2"} |