Skip to content

Instantly share code, notes, and snippets.

View 12Aleks's full-sized avatar
😎
The roots of education are bitter, but the fruit is sweet.

Oleksii Koba 12Aleks

😎
The roots of education are bitter, but the fruit is sweet.
View GitHub Profile
@zcaceres
zcaceres / Returning-in-Sequelize.md
Last active March 6, 2024 07:20
Using `Returning` with Sequelize and Postgres

Using Returning with Sequelize and Postgres

Some Sequelize commands don't return anything (or at least not anything useful) by default. Sequelize uses an option called returning to specify which data returns from a commands like .destroy() or update().

Let's look at three common Sequelize commands and see how to handle the data returned by each.

Create

By default, .create() returns the newly created instance. This is convenient, because we can then send data to the user:

@Scretch-1
Scretch-1 / SASS mixins
Last active November 17, 2023 09:40
SASS все самые полезные миксины
// clearfix
// пример: @include cfx;
=cfx
&:after
content: "."
display: block
height: 0
clear: both
visibility: hidden
@iliakarasin
iliakarasin / _helpers.scss
Last active June 6, 2018 06:49
Helper mixins
// Center
@mixin center($direction, $position:'absolute') {
@if $direction == x {
left: 50%;
position: if($position == relative, relative, absolute);
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
} @else if $direction == y {
position: if($position == relative, relative, absolute);