Skip to content

Instantly share code, notes, and snippets.

View avsej's full-sized avatar
🛋️
On the couch

Sergey Avseyev avsej

🛋️
On the couch
View GitHub Profile
@avsej
avsej / fetch_rubymine_license.rb
Created December 11, 2009 13:32
Automate rubymine license fetching
#!/usr/bin/env ruby
require 'rubygems'
require 'net/http'
require 'digest/md5'
require 'pp'
begin
require 'faker'
rescue LoadError
puts "You should install faker gem. (gem install faker)"
exit
@avsej
avsej / INSTALL
Created July 1, 2010 08:40
vi-like keybindings for GTK
cp gtkrc ~/.themes/vim/gtk-2.0-key/gtkrc
gconftool-2 -s /desktop/gnome/interface/gtk_key_theme --type string "vi"
@avsej
avsej / commit-msg
Created July 29, 2011 15:08
Fixed gerrit commit-msg script which works with 'commit -v'
#!/bin/sh
# From Gerrit Code Review 2.1.5-133-ga907b87
#
# Part of Gerrit Code Review (http://code.google.com/p/gerrit/)
#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# vim:et:ts=4:sw=4:
# user viuco;
worker_processes 1;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2011 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
diff --git c/src/Daemon.cpp w/src/Daemon.cpp
index 9963667..4f1c246 100644
--- c/src/Daemon.cpp
+++ w/src/Daemon.cpp
@@ -84,24 +84,22 @@ Daemon::processIoOptions()
} else if (iot_builtin.find("libev") != string::npos) {
iotype = LCB_IO_OPS_LIBEV;
#if LCB_VERSION >= 0x020007
} else if (iot_builtin.find("select") != string::npos) {
iotype = LCB_IO_OPS_SELECT;
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#include <stdio.h>
#include <libcouchbase/couchbase.h>
#include <libcouchbase/api3.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#ifdef _WIN32
#define PRIu64 "I64u"
#!/usr/bin/python
#
# This is a python script. You need a Python interpreter to run it.
# For example, ActiveState Python, which exists for windows.
#
# It can run standalone to convert files, or it can be installed as a
# plugin for Calibre (http://calibre-ebook.com/about) so that
# importing files with DRM 'Just Works'.
#
# To create a Calibre plugin, rename this file so that the filename
@avsej
avsej / repositories.rake
Created February 27, 2012 15:04
DEB/RPM repository maintenance script
# GistID: 1924422
# Author:: Couchbase <info@couchbase.com>
# Copyright:: 2011, 2012 Couchbase, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@echo off
pause
net stop "wuauserv"
echo importing setup-wsus.reg
%windir%\regedit.exe /s setup-wsus.reg
echo setup-wsus.reg imported succesfully
net start "wuauserv"
echo forcing update detection
wuauclt /detectnow
pause