Skip to content

Instantly share code, notes, and snippets.

Konstantin x2es

Block or report user

Report or block x2es

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build-ssh_config
#!/bin/bash
echo "# This file is GENERATED, all changes would be overwritten by ~/bin/build_ssh_config, place config to ~/.ssh/config.d/ instead" > ~/.ssh/config
cat ~/.ssh/config.d/* >> ~/.ssh/config
@x2es
x2es / better-nodejs-require-paths.md
Created Jan 20, 2018 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js
View better-nodejs-require-paths.md

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

View bash-tools.md

actual RAM available

$ free | grep 'buffers/cache' | awk '{ print $4 }'
View designer.html
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
@x2es
x2es / la_control.rb
Created Feb 23, 2011
Controls server load by 1min load average bounds using SIGSTOP and SIGCONT signals
View la_control.rb
#!/usr/bin/env ruby
# -- 8< --
# Original source: https://gist.github.com/840590
# Author: x@ES (KEIvanov@gmail.com)
#
# This is draft.
#
# For load test you can run in therminal
# $ perl -e '$|=1;do{$l==$r or print "."; $l=$r}until(($r=time-$^T)>5000)'
You can’t perform that action at this time.