This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
import os.path, string | |
VALID_FILENAME_CHARS = "-_.() %s%s%s" % (string.ascii_letters, string.digits, "/:\\") | |
# { "keys": ["alt+o"], "command": "open_filename_under_cursor" } | |
# https://gist.github.com/1186126 | |
class OpenFilenameUnderCursor(sublime_plugin.TextCommand): | |
def run(self, edit): | |
for region in self.view.sel(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# tuned configuration for PostgresSQL servers | |
# /usr/lib/tuned/postgres-db-server/tuned.conf | |
# | |
[cpu] | |
force_latency=1 | |
governor=performance | |
energy_perf_bias=performance | |
min_perf_pct=100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TMUX_VERSION="2.1" | |
LIBEVENT_VERSION="2.0.20" | |
NCURSES_VERSION="6.0" | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
[ -z "$PGDATA" ] && echo "PGDATA is not defined!" && exit 1 | |
[ ! -e $PGDATA/postmaster.pid ] && echo "Cannot find $PGDATA/postmaster.pid is PostgreSQL server running?" && exit 1 | |
PG_PID=$(head -1 $PGDATA/postmaster.pid) | |
PG_MEM_U=$(grep ^VmPeak /proc/$PG_PID/status | awk '{print $3}') | |
HP_MEM_U=$(grep ^Hugepagesize /proc/meminfo | awk '{print $3}') | |
[ "$PG_MEM_U" != "$HP_MEM_U" ] && echo "The units differ please calculate the Huge Pages manually" && exit 1 | |
PG_MEM=$(grep ^VmPeak /proc/$PG_PID/status | awk '{print $2}') | |
HP_MEM=$(grep ^Hugepagesize /proc/meminfo | awk '{print $2}') |