Skip to content

Instantly share code, notes, and snippets.

View spac3unit's full-sized avatar

Denis spac3unit

View GitHub Profile
@spac3unit
spac3unit / TransitionExpand.vue
Created March 10, 2021 09:02 — forked from CyberAP/TransitionExpand.vue
Transition height change in Vue
<template>
<div
class="transition-expand"
ref="container"
:style="style"
>
<transition
name="transition-fade"
@enter="enter"
@spac3unit
spac3unit / OuterClick.vue
Created March 10, 2021 09:02 — forked from CyberAP/OuterClick.vue
Handle clicks outside an element, done via Vue component
<template>
<div class="outer-click" ref="root">
<slot />
</div>
</template>
<script>
export default {
name: 'OuterClick',
props: {
@spac3unit
spac3unit / pomodoro.sh
Created November 30, 2020 16:05 — forked from jameswpm/pomodoro.sh
Minimalistic Pomodoro Timer
#!/bin/bash
#
# Minimalistic_Pomodoro_Timer
#
# Based on the SU answer found here: https://superuser.com/questions/224265/pomodoro-timer-for-linux/669811#669811
#
# Tested in Ubuntu 16.04 and Arch
pomodorotime () {
notify-send "Time to Work" "Focus" -u normal -a 'Pomodoro' -i $HOME/Documentos/icon.png
paplay /usr/share/sounds/freedesktop/stereo/window-attention.oga
@spac3unit
spac3unit / .emacs
Created October 29, 2020 22:25 — forked from jclosure/.emacs
Complete Emacs for C++ development with cquery for symbol nav and autocomplete (company)
;;; Commentary:
;; Emacs configuration clean, fast-loading, optimized for development
;; reference: https://sriramkswamy.github.io/dotemacs/
;; cquery
;; helm
;; swiper
;; counsel
;; neo-tree (vcs-intgration)
@spac3unit
spac3unit / toGif.sh
Created July 14, 2020 02:25 — forked from patriciogonzalezvivo/toGif.sh
Frag Shader to gif
#!/bin/bash
SHADER=$1
SEC=$1
COUNTER=0
for i in `seq -w 0.01 .031 $SEC`; do
echo $i
`glslViewer $SHADER -s $i -o frame-$COUNTER.png`
let COUNTER=COUNTER+1

#User Stories - Overview

  1. Authentication: User can signup/login/logout

  2. Items for sale: User can view lists of items for sale and search by name, filter by price.

  3. Shopping Cart: User can add items to shopping cart and the app remembers it next time you login. User can view all the items in their shopping cart. User can delete items in the shopping cart. Shopping cart uses an integer column to store "state".

  4. Checkout: User can fill in form and submit billing info. After submitting billing info, items in the shopping cart will move to a different "state".

@spac3unit
spac3unit / tokens.md
Created January 20, 2020 20:11 — forked from sergeysova/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Preconditions:

В данной заметке рассматривается работа JWT с симметичным алгоритмом шифрования (HS256/HS384/HS512)

Основы:

Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им логина/пароля с данными сохранёнными в базе данных.

Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.

const d = createDomain();
d.onCreateStore((s) => {
s.updates.watch((value) => {
console.log(`STORE ${s.shortName} UPDATED`, value);
});
});
d.onCreateEvent((e) => {
e.watch((params) => {
@spac3unit
spac3unit / d.js
Created January 20, 2020 20:04 — forked from ivanov-v/d.js
import {createStore, createEvent, createEffect} from 'effector';
import {authService, googleAuthProvider} from '../cloudStore';
const userStateChange = createEvent('userStateChange');
const signIn = createEffect('signIn').use(() =>
authService.signInWithPopup(googleAuthProvider)
);
const signOut = createEffect('signOut').use(() => authService.signOut());
@spac3unit
spac3unit / WYSIWYG.md
Created December 18, 2019 15:53 — forked from monolithed/WYSIWYG.md
WYSIWYG редакторы

Модуль должен соответствовать следующим требованиям:

  • Свободная лицензия (в идеале)
  • API
  • Масштабировать текст по количеству символов (в идеале)
  • Быть кроссбраузерным IE9+
  • Сокращать ссылки и подсвечивать ссылки
  • Иметь защиту от XSS
  • Конфигурироваться
  • Поддерживать историю