Skip to content

Instantly share code, notes, and snippets.

View zibellon's full-sized avatar
🏠
Working from home

Artem zibellon

🏠
Working from home
View GitHub Profile
function funAsync() {
return new Promise((resolve, reject) => {
setTimeout(() => {
console.log('ASYNC END');
// resolve()
reject("asdasdads");
}, 3000);
})
}
const Sequelize = require("sequelize");
const { sequelizeInstance } = require("..");
class ToDo extends Sequelize.Model {}
ToDo.init(
{
id: {
type: Sequelize.DataTypes.UUID,
primaryKey: true,
const { Sequelize } = require("sequelize");
//Создваем instance Sequelize
const sequelizeInstance = new Sequelize({
// dialect: "postgres",
// host: "21.23.35.4",
// port: 6000,
// database: "js-todo",
// username: "postgres",
// password: "qwerty10",
const express = require('express');
const http = require('http');
const cors = require('cors');
const app = express();
app.use(cors());
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
@zibellon
zibellon / gist:a69d75665454e76f74b8d678cf089517
Created September 21, 2019 10:40
Собственный координатор для управления экранами
public class CoordinatorMain {
public interface CustomBackBtnClicker {
void backClick();
}
//Класс который отвечает за навигацию в приложении
private String LOG = "CoordinatorMAIN!";
@zibellon
zibellon / gist:d185ab3ad8eb53ee0938f79854b8b0cc
Created September 21, 2019 10:38
Отлов событий с сокет сервера и передача их в главное активити.
public class MySocket {
public enum SocketEventsEnum {
operationCreated,
operationComplete,
newMessage,
sameUserConnected
}
//Сам класс с сокетом
@zibellon
zibellon / 1MarkerAnimation.java
Created June 23, 2019 19:57 — forked from broady/1MarkerAnimation.java
Animating Markers
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@zibellon
zibellon / 1MarkerAnimation.java
Created June 23, 2019 19:57 — forked from broady/1MarkerAnimation.java
Animating Markers
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;