i " вставить текст до курсора
/** | |
* @brief executeQueriesFromFile Read each line from a .sql QFile | |
* (assumed to not have been opened before this function), and when ; is reached, execute | |
* the SQL gathered until then on the query object. Then do this until a COMMIT SQL | |
* statement is found. In other words, this function assumes each file is a single | |
* SQL transaction, ending with a COMMIT line. | |
*/ | |
void executeQueriesFromFile(QFile *file, QSqlQuery *query) | |
{ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
FROM hexlet/hexlet-base | |
RUN apt-install python-pip python-dev | |
RUN apt-install python3-pip python3-dev | |
RUN pip3 install pytest | |
ENV PYTHONDONTWRITEBYTECODE 1 |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
(ns slack | |
(:require [clj-http.client :as client] | |
[clojure.data.json :as json])) | |
(defn send-to-slack | |
"Sends a simple message to slack using an 'incoming webhook'. | |
url will be of form: https://myapp.slack.com/services/hooks/incoming-webhook?token=mytoken . | |
(Exact url you should use will appear on the slack integration page) | |
text will be any valid message. | |
This implementation could be expanded if you wanted to specify channel, username, etc. |
I heard from GitHub Two-Factor Authentication](https://github.com/blog/1614-two-factor-authentication) nearly a couple of days ago when I was reading my RSS feed. I enabled it and couldn' push to any of my repositories anymore. Learn in this blog post how to fix it.
"Is a process involving two stages to verify the identity of an entity trying to access services in a computer or in a network". Github solves this authentication with sending an SMS to a device which wants to push to their platform.
#%RAML 0.8 | |
title: World Music API | |
baseUri: http://example.api.com/{version} | |
version: v1 | |
schemas: | |
- halLink: | | |
{ "$schema": "http://json-schema.org/schema", | |
"type": "object", | |
"description": "a Hypertext Application Language link", |
require 'dry-validation' | |
class EnvValidation | |
class ENV | |
def inspect | |
ivs = instance_variables.each { |v| "#{v}=#{instance_variable_get(v)}" }.join(', ') | |
"ENV[#{ivs}]" | |
end | |
def to_s |