Skip to content

Instantly share code, notes, and snippets.

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

Matthieu Hostache matthieuh

🏠
Working from home
View GitHub Profile
const unique = (list, key) =>
key
? list.map(e => e !== null && e[key])
.map((e, i, final) => final.indexOf(e) === i && i)
.filter(e => e !== null && list[e])
.map(e => list[e])
: [...new Set(list)].filter(entry => entry !== null)
describe('uniq()', () => {
it('should work as expected', () => {
@matthieuh
matthieuh / .hyper.js
Last active December 8, 2017 10:00
Hyper Config
module.exports = {
plugins: [
"hyper-snazzy",
"hyper-hide-title",
"hyper-tabs-enhanced",
"hyper-sync-settings"
],
config: {
fontSize: 15,
// fontFamily: '"Menlo-Regular"',
@matthieuh
matthieuh / init.coffee
Last active February 28, 2018 12:49
My Atom Settings - settings, keymaps, user styles, init script, snippets and installed packages (automatic update by http://atom.io/packages/sync-settings)
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
st=>start: Start
e=>end
login=>operation: Login Screen
loginCredentialsEntering=>subroutine: user enter credentials
isLoginSucceed=>condition: Login succeed?
isMultipleOrg=>condition: User have more than  1 organization?
selectOrg=>operation: Organization Selection Screen
orgSelection=>subroutine: User choose an organization
dashboardTab=>operation: Home Screen - Dashboard Tab
@matthieuh
matthieuh / controllerExist.coffee
Created January 8, 2015 10:58
Check if angular controller exist
controllerExist = (controllerStrg) ->
try
$controller controllerStrg
return false
catch error
return !(error instanceof TypeError)