Skip to content

Instantly share code, notes, and snippets.

View vovs03's full-sized avatar

Vλadimir Pavλychev vovs03

View GitHub Profile
@vovs03
vovs03 / MongoDB-Warnings.md
Created September 21, 2018 15:08
MongoDB Warnings in Linux Mint 18.3
➜  diventello-web git:(test-1) mongo --host 127.0.0.1:27017
MongoDB shell version v3.6.7
connecting to: mongodb://127.0.0.1:27017/
MongoDB server version: 3.6.7
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
	http://docs.mongodb.org/
Questions? Try the support group
@vovs03
vovs03 / MongoDB-help.md
Created September 21, 2018 15:18
db help methods (MongoDB)
> db.help()
DB methods:
	db.adminCommand(nameOrDocument) - switches to 'admin' db, and runs command [just calls db.runCommand(...)]
	db.aggregate([pipeline], {options}) - performs a collectionless aggregation on this database; returns a cursor
	db.auth(username, password)
	db.cloneDatabase(fromhost)
	db.commandHelp(name) returns the help for the command
	db.copyDatabase(fromdb, todb, fromhost)
	db.createCollection(name, {size: ..., capped: ..., max: ...})

Hardware

Unit Describe
Graphics: Card: NVIDIA GT218 [GeForce 210] bus-ID: 01:00.0 chip-ID: 10de:0a65
Display Server: x11 (X.Org 1.19.5 )
Resolution: [email protected]
OpenGL: renderer: GeForce 210/PCIe/SSE2
version: 3.3.0 NVIDIA 340.104 Direct Render: Yes
@vovs03
vovs03 / syslog
Created October 11, 2018 14:05
syslog for issue cinnamone was broken
This file has been truncated, but you can view the full file.
Oct 11 07:58:15 OsArts-008 rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="777" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Oct 11 07:59:01 OsArts-008 kernel: [ 366.068808] perf: interrupt took too long (3168 > 3130), lowering kernel.perf_event_max_sample_rate to 63000
Oct 11 07:59:37 OsArts-008 anacron[772]: Job `cron.daily' terminated
Oct 11 07:59:37 OsArts-008 anacron[772]: Normal exit (1 job run)
Oct 11 08:00:10 OsArts-008 dbus[730]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service'
Oct 11 08:00:32 OsArts-008 vsls-agent: Agent Information: 1002 :
Oct 11 08:00:33 OsArts-008 vsls-agent: Trace log: /tmp/VSFeedbackVSRTCLogs/20181011_050032_Agent.log
Oct 11 08:00:33 OsArts-008 vsls-agent: Agent Information: 0 :
Oct 11 08:00:33 OsArts-008 vsls-agent: vsls-agent v0.3.735.3183 (pid: 8370)
Oct 11 08:00:33 OsArts-008 vsls-agent: Agent Information: 0 :
1. принципиальное различие скриптовых и “обычных” языков
Скриптовый язык программирования — язык программирования, разработанный для записи «сценариев»,
последовательностей операций, которые пользователь может выполнять на компьютере.
Интерпертируется с помощью интерпретатора. Имеет динамическую типизацию.
Интерпретация — пооператорный (покомандный, построчный) анализ, обработка и тут же выполнение исходной программы
или запроса (в отличие от компиляции, при которой программа транслируется без её выполнения)[2][3][4].
2.Duck Typing
Ruby
What is a class? - Каркас для объектов, содержит данные, методы, инстансы.
What is the difference between a class and a module? - Модуль - пространство имен, не может иметь экземпляров.
What is an object? - Экземпляр класса.
How would you declare and use a constructor in Ruby?
def initialize(some, data)
p "Initializer #{some} #{data}"
end
@vovs03
vovs03 / gist:c17fbd92e7c021fb319042dcd5d4c392
Created October 16, 2018 10:53 — forked from evtuhovich/gist:1134998
Список вопросов для собеседования
Ruby
принципиальное различие скриптовых и “обычных” языков
3 принципа ООП
реализация множественного наследования в ruby
duck typing
многопоточность в ruby
Rails
что такое MVC и зачем это нужно
локига в контроллере, должна ли быть и почему
синхронные и асинхронные операции — предложить варианты решения
@vovs03
vovs03 / _readme.md
Created October 20, 2018 05:46 — forked from vchernogorov/_readme.md
Паттерны проектирования

Паттерны проектирования

Данный гист содержит описание существующих паттернов проектирования. Также возможны примеры на джаве.

Содержание:

@vovs03
vovs03 / sublime_plugins.md
Created October 20, 2018 15:25 — forked from barnes7td/sublime_plugins.md
Sublime Plugins for Ruby and Rails

Sublime Plugins for Ruby and Rails

General

I would start by installing the Sublime Package Control manager. This tool will allow you to install the other plugins without having to clone git repositories and copying them to the correct folders. Instead you will the command drop-down menu with "Ctrl + Shift + P" and then scrolling down until you see "Package Control: Install Package". A search bar will pop up and you can type the name of a package, click on the name and it will self install. If you have problems setting any of these up email me at [email protected]

Packages/Plugins

  1. Sublime Package Control - Install this first. This tool will allow you to easily install most (if not all) the other plugins in this list. (Ctrl + Shift + P, then select Package Control: Install Package)

  2. SublimeERB - This plugin auto creates the erb tags. (<% %>, <%= %>, etc.) (Ctrl +