I hereby claim:
- I am sallar on github.
- I am sallar (https://keybase.io/sallar) on keybase.
- I have a public key whose fingerprint is 0829 0901 2FD7 5301 15F1 1DA9 8960 4063 DDF5 8CF8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<?php | |
require_once dirname(__FILE__) . '/jdatetime.class.php'; |
OK, So imagine you have this module which accepts another module as a parameter to one of it’s methods:
define("modules/module2", [], function() {
return {
/**
* @param {module:myNamespace/module1} SomeModule
*/
somethingElse: function(SomeModule) {
function reducer(state = []) { | |
return [...state, { | |
title: "Test", | |
completed: false | |
}]; | |
} |
const { normalize, Schema, arrayOf } = require('normalizr'); | |
const { v4 } = require('uuid'); | |
const group = new Schema('groups'); | |
const groups = arrayOf(group); | |
group.define({ | |
children: groups | |
}); |
const nodemailer = require('nodemailer'); | |
const aws = require('aws-sdk'); | |
// create Nodemailer SES transporter | |
const transporter = nodemailer.createTransport({ | |
SES: new aws.SES({ | |
apiVersion: '2010-12-01', | |
region: 'eu-west-1' | |
}) | |
}); |
// By Sallar Kaboli | |
import { sortBy, at } from 'lodash'; | |
export function sortDeepByKey(list, sortKey, childrenKey) { | |
if (!sortKey || !childrenKey) { | |
throw new Error('Insufficient data provided for sorting'); | |
} | |
return sortByKey(list, sortKey).map(item => { | |
return { | |
...item, |
module Cart { | |
export function test1() { | |
console.log('hi'); | |
} | |
export function test2() { } | |
} | |
function curryModule<T>(mod: T): T { | |
return Object | |
.keys(mod) |
enum SomethingOrNothing<T> { | |
Something(T), | |
Nothing, | |
} | |
use self::SomethingOrNothing::*; | |
use std::io::prelude::*; | |
use std::io; | |
pub trait Minimum: Copy { |
ipc.on('channel:enqueue', (e, payload) => { | |
const { channelName, stack, id } = payload; | |
getQueue() | |
.channel(channelName) | |
.enqueue( | |
() => { | |
return new Promise(resolve => { | |
ipc.once(`channel:resolve:${id}`, resolve); | |
e.sender.webContents.send(`channel:execute:${id}`); | |
}); |