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
# vim:ft=tcl: | |
# GistID: 3052537 | |
# | |
# apt-get install tcl-signal | |
if {$tcl_interactive} { | |
package require Signal | |
signal add SIGINT {} | |
if [info exists env(DISPLAY)] { | |
set env(TERM) xterm-color |
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
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
# | |
# Deployment structure | |
# | |
# SERVER: | |
# /etc/init.d/nginx (1. nginx) | |
# /home/app/public_html/app_production/current (Capistrano directory) | |
# |
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
#define pp_ev_allow_revent(l, e, revt_) \ | |
if ( ( (e)->events & revt_) != revt_ ) { \ | |
ev_io_stop(l, (e)); \ | |
ev_io_set( (e), (e)->fd, (e)->events | revt_); \ | |
ev_io_start(l, (e)); \ | |
} | |
#define pp_ev_ignore_revent(l, e, revt_) \ | |
if ((e)->events & revt_) { \ | |
ev_io_stop(l, (e)); \ |
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 tclsh | |
# GistID: 3293907 | |
# | |
# USAGE: | |
# | |
# 1. put somewhere in the PATH | |
# 2. ensure that repository has remote with name 'gerrit' | |
# 3. execute 'git fetch-patches' | |
package require json |
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
/** | |
* | |
*/ | |
/** | |
* Couchbase Datatype Flags | |
* | |
* These flags help to disambiguate the format and compression of values. | |
* |
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
=== Часть 1. Обзорная информация | |
== Обязательно посмотрите | |
http://en.wikipedia.org/wiki/Internet_media_type | |
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes или http://www.flickr.com/photos/girliemac/sets/72157628409467125 | |
http://api.rubyonrails.org/classes/ActionDispatch/Response.html | |
http://api.rubyonrails.org/classes/ActionDispatch/Request.html | |
== Документация по AJAX в jQuery |
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
digraph libcouchbase { | |
"libcouchbase2-all" -> "libcouchbase-bin" [label = "provided by"]; | |
"libcouchbase2" -> "libcouchbase2-core" [label = "depends on"]; | |
"libcouchbase2" -> "libcouchbase2-backend" [label = "depends on"]; | |
"libcouchbase2-backend" -> "libcouchbase2-libevent" [label = "provided by"]; | |
"libcouchbase2-backend" -> "libcouchbase2-libev" [label = "provided by"]; | |
"libcouchbase-bin" -> "libcouchbase2" [label = "depends on"]; | |
"libcouchbase-dbg" -> "libcouchbase2-core" [label = "depends on"]; | |
"libcouchbase-dev" -> "libcouchbase2-core" [label = "depends on"]; | |
"libcouchbase-libev-dev" -> "libcouchbase2-libev" [label = "depends on"]; |
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
LOCALTIME=$(date +%Y-%m-%dT%H:%M) | |
AMERICA=$(TZ=America/Los_Angeles date +%H:%M%Z) | |
CET=$(TZ=Europe/Oslo date +%H:%M%Z) | |
ART=$(TZ=America/Buenos_Aires date +%H:%M%Z) | |
xsetroot -name "$WIFI $LOCALTIME $AMERICA $CET $ART" |
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
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ | |
/* GistID: 4621066 | |
*/ | |
/* | |
* Copyright 2013 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 | |
* |
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
set -xe | |
server=192.168.1.200 | |
curl --data "ns_config:set({node, node(),{timeout, ns_memcached_outer}},300000)." -u Administrator:password http://$server:8091/diag/eval | |
curl --data "ns_config:set({node, node(),{timeout, memcached_recv}},300000)." -u Administrator:password http://$server:8091/diag/eval | |
curl --data "ns_config:set({node, node(),{timeout, memcached_stats_recv}},300000)." -u Administrator:password http://$server:8091/diag/eval | |
curl --data "ns_config:set({node, node(),{timeout, ns_memcached_outer_heavy}},300000)." -u Administrator:password http://$server:8091/diag/eval | |
curl --data "ns_config:set({node, node(),{timeout, ns_memcached_outer_very_heavy}},600000)." -u Administrator:password http://$server:8091/diag/eval | |
curl --data "ns_config:set({node, node(),{timeout, ebucketmigrator_connect}},1200000)." -u Administrator:password http://$server:8091/diag/eval |