Skip to content

Instantly share code, notes, and snippets.

Sven Lito svnlto

View GitHub Profile
View checks.js
const checkCategoryMapping = require('./check_category_mapping');
const categories = (checkName) => [checkCategoryMapping[checkName] || 'Style'];
// Here Be Dragons: this function extracts the relevant value that triggered the issue for
// checks in the Complexity category. Unfortunately, these values are not available in a
// structured way, so we extract them from strings. That means that any check categorized
// as Complexity MUST have a rule here to extract value.
//
// If a matching string segment cannot be found, `null` will be returned.
@svnlto
svnlto / feathersjs-dataloader.js
Created Jul 24, 2017 — forked from giautm/feathersjs-dataloader.js
Use facebook's dataloader to batch any Service get
View feathersjs-dataloader.js
'use strict';
const DataLoader = require('dataloader');
class Service {
constructor({ BaseService, options }) {
this.id = BaseService.id || 'id';
this.service = BaseService;
this.dataloader = new DataLoader(this._batchGet.bind(this), options);
View auth.js
import { take, call, put, race } from 'redux-saga/effects';
import { forwardTo } from '../utils';
import AuthService from '../services/auth';
const auth = new AuthService();
import {
SENDING_REQUEST,
LOGIN_REQUEST,
REGISTER_REQUEST,
View login.js
const { request } = require('graphql-request');
const chalk = require('chalk');
const ora = require('ora');
const query = `
mutation loginWithEmailPassword($email: String!, $password: String!) {
loginWithEmailPassword(input: {email: $email, password: $password}) {
idToken
}
View readme.md

node-j2-pdf-generator

Statements

const pdf = require('@jenius2/j2-pdf-generator');
View zshrc
source $HOME/.antigen/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
antigen bundle git
antigen bundle github
antigen bundle nvm
antigen bundle npm
antigen bundle docker
View -
type CardLimits {
transaction: Int @examples(values: [123123, 123123123])
cash: Int @examples(values: [333333333, 123123123])
}
enum CardStatus {
PROCESSING,
ACTIVE,
INACTIVE,
BLOCK_PERMANENT,
View -
diff --git a/app/Fixtures/menuItems.json b/app/Fixtures/menuItems.json
index f3bd7ab4..4f8fdd27 100644
--- a/app/Fixtures/menuItems.json
+++ b/app/Fixtures/menuItems.json
@@ -9,35 +9,15 @@
"route": "Dashboard"
},
{
- "id": "inAndOut",
- "icon": "in_out"
View tux.conf
set-option -g default-command "reattach-to-user-namespace -l $SHELL"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set-option -g default-terminal "screen-256color"
# start windows and panes at 1
set -g base-index 1
set -g pane-base-index 1
# use vi mode
View init.vim
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Plugin 'gmarik/vundle'
You can’t perform that action at this time.