Skip to content

Instantly share code, notes, and snippets.

Sergiu Neamt sese

Block or report user

Report or block sese

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sese
sese / solving request collisions.md
Last active Aug 14, 2019
Solving request collisions in javascript environment
View solving request collisions.md

Solving request collisions in javascript environment

Argumentation

We define a collision in term of requests, when 2 or more requests are generated in the time interval between first request was originated and the time when we get the response.

So if we have a request that takes 10s, collision requests will be all requests that call same resource, with same parameters and are originated in 10 sec frame window only before receiving the response of the first request.

View bulljs - remove repeatable jobs.md
var Queue = require('bull')

var queueName = 'cron-daily'
var q = new Queue(queueName, 'redis://localhost:6379')

var name = "World"
var cnt = 1
var cronExpr = {cron: "*/1 * * * *"}
View base-class.md

#Base Class

##before

import {AuthService} from './services/auth.service';
import {LocalStorage} from './services/localstorage.service';
import {Current} from './current';  

export class Base{
@sese
sese / index.js
Created Jun 27, 2016
requirebin sketch
View index.js
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var AmpersandState = require("ampersand-state");
var Person = AmpersandState.extend({
props: {
firstName: 'string',
lastName: 'string'
@sese
sese / index.js
Last active Jun 27, 2016
requirebin sketch
View index.js
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var AmpersandState = require("ampersand-state");
var Person = AmpersandState.extend({
props: {
firstName: 'string',
lastName: 'string'
You can’t perform that action at this time.