You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
import sublime, sublime_plugin, re | |
class CreateCommand(sublime_plugin.TextCommand): | |
# Runs the plugin | |
def run(self, edit, stub, offset): | |
self.view.insert(edit, offset, stub) |
A quick guide to write a very very simple "ECHO" style module to redis and load it. It's not really useful of course, but the idea is to illustrate how little boilerplate it takes.
Step 1: open your favorite editor and write/paste the following code in a file called module.c
#include "redismodule.h"
/* ECHO <string> - Echo back a string sent from the client */
int EchoCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
The files in this gist are for having Jenkins automatically manage a chef repository using git submodules. This allows for clean, clutter free management of individual cookbooks, and individual respositories for roles, environments and data bags in our chef-repo
.
The process relies on using Github (we use Github Enterprise) and Jenkins in combination with the Jenkins Github plugin to notify Jenkins when a repository has changed.
Our chef-repo
directory looks something like:
chef-repo
- cookbooks
- Each cookbook is a git submodule managed by Jenkins
- data_bags (git submodule managed by Jenkins)
import subprocess | |
import shutil | |
import os | |
import sys | |
import tarfile | |
def get_version(project_root): | |
process = subprocess.Popen( | |
['git', 'describe'], | |
stdout=subprocess.PIPE, |