Skip to content

Instantly share code, notes, and snippets.

View drucoder's full-sized avatar
😋
lets code right now!

Andrew drucoder

😋
lets code right now!
View GitHub Profile
@drucoder
drucoder / prepare.sh
Created April 25, 2020 13:03
Prepare linux to usage
#! /usr/bin/env bash
sudo apt install -y mc git vim chromium-browser htop
curl -s "https://get.sdkman.io" | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
@drucoder
drucoder / emmet.html
Created March 7, 2020 12:21
emmet example
<!DOCTYPE html>
<html>
<head><title>Simple html page</title></head>
<body>
<pre>html>(head>title{simple html page})+body>h1{This is the Emmet, baby}+.block$*4>h3{subhead$}+lorem20</pre>
<h1>This is the Emmet, baby</h1>
<div class="block1">
<h3>subhead 1</h3>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. A ab amet consequuntur, deserunt doloribus eveniet, harum
illo natus nulla, obcaecati officiis quibusdam ratione similique sunt veniam veritatis vero voluptatibus voluptatum.
@drucoder
drucoder / build.gradle
Created January 14, 2019 14:07
SparkJava DebutTool
compile "com.sparkjava:spark-debug-tools:0.5"
@drucoder
drucoder / package.json
Created September 6, 2018 17:02
Spring Boot REST: добавляем webpack
{
"name": "sarafan",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"dependencies": {
"vue": "^2.5.17",
"vue-resource": "^1.5.1"
},
"devDependencies": {
@drucoder
drucoder / webpack.config.js
Created September 6, 2018 17:01
Spring Boot REST: добавляем webpack
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
mode: 'development',
devtool: 'source-map',
entry: path.join(__dirname, 'src', 'main', 'resources', 'static', 'js', 'main.js'),
devServer: {
contentBase: './dist',
compress: true,
@drucoder
drucoder / pom.xml
Last active April 20, 2020 15:02
Sprint boot MVC: интеграционные тесты - зависимости
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<version>RELEASE</version>
<scope>test</scope>
@drucoder
drucoder / session_tables.sql
Created July 27, 2018 04:37
Spring Boot REST: добавляем oAuth2 авторизацию (sessions table) 2
CREATE TABLE spring_session (
primary_id CHAR(36) NOT NULL
CONSTRAINT spring_session_pk
PRIMARY KEY,
session_id CHAR(36) NOT NULL,
creation_time BIGINT NOT NULL,
last_access_time BIGINT NOT NULL,
max_inactive_interval INTEGER NOT NULL,
expiry_time BIGINT NOT NULL,
principal_name VARCHAR(300) -- <= here was 100
@drucoder
drucoder / application.properties
Created July 27, 2018 04:36
Spring Boot REST: добавляем oAuth2 авторизацию 2
spring.session.jdbc.initialize-schema=always
spring.session.jdbc.table-name=SPRING_SESSION
spring.session.jdbc.schema=classpath:session_tables.sql
@drucoder
drucoder / build.gradle
Created July 27, 2018 04:34
Spring Boot REST: добавляем oAuth2 авторизацию (зависимости) 2
compile('org.springframework.session:spring-session-jdbc')
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
@drucoder
drucoder / build.gradle
Created July 20, 2018 04:30
Spring Boot REST: добавляем oAuth2 авторизацию (зависимости)
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.0.0.RELEASE')