- Проверяем что wifi модуль есть
$ nmcli d| // Меняем название расширения и его ID на свои | |
| const extName = "Text to Speech Reader"; | |
| const extId = "anaeokdaodomppjdibeifmcbebgfnmfp"; | |
| const STORE_URL = "https://chromewebstore.google.com/detail/EXT_NAME/EXT_ID"; | |
| const PREVIEW_URL = STORE_URL + "/preview"; | |
| let urlExtName = extName | |
| .replace(/[^0-9a-z ]/gi, "") | |
| .toLowerCase() |
| import fs from 'fs/promises'; | |
| import path from 'path'; | |
| import fetch from 'node-fetch'; | |
| import open from 'open'; | |
| const checkText = async (apiKey, apiType, text = null, url = null, tbclass = null, more = 0) => { | |
| const uri = "https://turgenev.ashmanov.com/"; | |
| // Формируем параметры запроса | |
| const params = new URLSearchParams({ |
| # frozen_string_literal: true | |
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| gem 'rails', '5.2.4.5' | |
| gem 'sqlite3' | |
| end |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int *initArray(int n) { | |
| int i; | |
| int *array; | |
| array = malloc(n * sizeof(*array)); | |
| /* you should always check malloc success */ | |
| if (array == NULL) |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
| require 'active_record' | |
| class Person < ActiveRecord::Base | |
| establish_connection adapter: 'sqlite3', database: 'foobar.db' | |
| connection.create_table table_name, force: true do |t| | |
| t.string :mobile_no | |
| end | |
| validate do | |
| regexp = /^(07[\d]{9})/ |
| require 'active_record' | |
| require "active_support" | |
| class Person < ActiveRecord::Base | |
| establish_connection adapter: 'sqlite3', database: 'foobar.db' | |
| connection.create_table table_name, force: true do |t| | |
| t.date :date | |
| end | |
| validate :is_date? |
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
| # for more info: https://gist.github.com/1120938 |