Skip to content

Instantly share code, notes, and snippets.

View svnlto's full-sized avatar
🦙

Sven Lito svnlto

🦙
View GitHub Profile

Show User

Returns json data about a single user.

  • URL

    /users/:id
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 July 24, 2017 18:00 — forked from giautm/feathersjs-dataloader.js
Use facebook's dataloader to batch any Service get
'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);
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,
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
}

node-j2-pdf-generator

Statements

const pdf = require('@jenius2/j2-pdf-generator');
@svnlto
svnlto / zshrc
Last active April 26, 2017 17:39
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
@svnlto
svnlto / -
Created April 10, 2017 06:22
type CardLimits {
transaction: Int @examples(values: [123123, 123123123])
cash: Int @examples(values: [333333333, 123123123])
}
enum CardStatus {
PROCESSING,
ACTIVE,
INACTIVE,
BLOCK_PERMANENT,
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"
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