Skip to content

Instantly share code, notes, and snippets.

View schfkt's full-sized avatar
💪

Pavel Ivanov schfkt

💪
View GitHub Profile
@schfkt
schfkt / profiler.js
Last active January 8, 2016 11:31
Mongodb profiler's output
{
"op" : "getmore",
"ns" : "some.namespace",
"query" : {
"some": "query"
},
"cursorid" : NumberLong(6375683362946191350),
"ntoreturn" : 0,
"keyUpdates" : 0,
"numYield" : 773,
@schfkt
schfkt / better-nodejs-require-paths.md
Created June 14, 2016 11:13 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@schfkt
schfkt / gulpfile.js
Created October 24, 2016 09:49
Gulp config for a simple frontend development process
var gulp = require('gulp');
var clean = require('gulp-clean');
var replace = require('gulp-replace');
var concat = require('gulp-concat-css');
var watch = require('gulp-watch');
var batch = require('gulp-batch');
var plumber = require('gulp-plumber');
var csscomb = require('gulp-csscomb');
var BUILD_DIR = '../done';
@schfkt
schfkt / nodemon.json
Created February 24, 2017 20:46
Nodemon sample config
{
"ignore": [
".git",
"node_modules",
".idea"
],
"verbose": true,
"ext": "js"
}
@schfkt
schfkt / restricted-psp.yaml
Created August 3, 2018 17:16 — forked from tallclair/restricted-psp.yaml
Restricted PodSecurityPolicy
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: restricted
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
spec:
@schfkt
schfkt / kubernetes_commands.md
Created August 13, 2018 06:45 — forked from edsiper/kubernetes_commands.md
Kubernetes Useful Commands
@schfkt
schfkt / random-path-url.lua
Created May 12, 2020 09:53 — forked from shyuan/random-path-url.lua
Random path benchmark Lua script for wrk
-- https://github.com/wg/wrk
-- wrk -c 1000 -d 10s -s random-path-url.lua http://localhost:8080
local paths = {
"/path1.txt",
"/path2.txt",
"/path3.txt",
"/path4.txt",
"/path5.txt",
"/path6.txt"