A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord| # Basic key operators to query the JSON objects : | |
| # #> : Get the JSON object at that path (if you need to do something fancy) | |
| # -> : Get the JSON object at that path (if you don't) | |
| # ->> : Get the JSON object at that path as text | |
| # {obj, n} : Get the nth item in that object | |
| # https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE | |
| # Date | |
| # date before today |
| class Whereable | |
| def initialize(where:, model: Item, ranking_conditions: [], valid: true, data_source: nil) | |
| @model = model | |
| @where = where | |
| @data_source = data_source | |
| @ranking_conditions = ranking_conditions | |
| @valid = valid | |
| end | |
| def valid? |
| // Файл "tsconfig.json": | |
| // - устанавливает корневой каталог проекта TypeScript; | |
| // - выполняет настройку параметров компиляции; | |
| // - устанавливает файлы проекта. | |
| // Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта. | |
| // Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта. | |
| // Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга. | |
| // Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути. | |
| // Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию. | |
| // Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json". |
| require 'apple_id' | |
| # NOTE: in debugging mode, you can see all HTTPS request & response in the log. | |
| # AppleID.debug! | |
| pem = <<-PEM | |
| -----BEGIN PRIVATE KEY----- | |
| : | |
| : | |
| -----END PRIVATE KEY----- |
In /usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf and /usr/share/pulseaudio/alsa-mixer/paths/analog-input-mic.conf:
[Element Internal Mic Boost] set volume to zero.[Element Int Mic Boost] set volume to zero.[Element Mic Boost] set volume to zeroFind your source name from the following command; mine is alsa_input.pci-0000_00_1f.3.analog-stereo
$ pacmd list-sources | grep 'name:.*input'
Edit /etc/pulse/default.pa and add the following lines, where INPUT_NAME is name of the input source from above step:
| version: 2 | |
| jobs: | |
| build: | |
| docker: | |
| - image: circleci/ruby:2.5.3-node-browsers | |
| environment: | |
| RAILS_ENV: test | |
| DATABASE_URL: postgres://[email protected]:5432/rails-test | |
| - image: circleci/postgres:9.6 | |
| environment: |
| module.exports = { | |
| verbose: true, | |
| moduleDirectories: ['node_modules'], | |
| transform: { | |
| '\\.js$': '<rootDir>/../build/utils/webpack_polyfill' | |
| } | |
| } |
I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api
Rails.application.routes.draw do
constraints subdomain: "api" do
scope module: "api" do