Skip to content

Instantly share code, notes, and snippets.

View Slach's full-sized avatar
💭
deep diving into kuberntes

Eugene Klimov Slach

💭
deep diving into kuberntes
View GitHub Profile
@muxx
muxx / init.php
Last active November 1, 2019 12:28
pinba configure in Bitrix
<?php
include __DIR__ . '/pinba_configure.php';
@jfrost
jfrost / gist:6584871
Created September 16, 2013 18:53
PostgreSQL query: completely unused indexes
-- Completely unused indexes:
SELECT relid::regclass as table, indexrelid::regclass as index
, pg_size_pretty(pg_relation_size(indexrelid))
FROM pg_stat_user_indexes
JOIN pg_index
USING (indexrelid)
WHERE idx_scan = 0
AND indisunique IS FALSE order by pg_relation_size(indexrelid);
@adammw
adammw / libvlc.js
Created May 9, 2012 14:06
Object-orientated libVLC bindings for node.js implemented in javascript using node-ffi. Superseded by https://github.com/adammw/node-vlc-ffi
/*
* node-ffi-vlc v0.0.2
* Object-orientated libVLC bindings for node.js implemented in javascript using node-ffi
* Not for production use, use at your own risk, do with what you will.
* See libvlc docs for more info, http://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc.html
*/
var EventEmitter = require('events').EventEmitter,
FFI = require("node-ffi");
var libVLC = new FFI.Library("libvlc", {
"""
This is a simple example of WebSocket + Tornado + Redis Pub/Sub usage.
Do not forget to replace YOURSERVER by the correct value.
Keep in mind that you need the *very latest* version of your web browser.
You also need to add Jacob Kristhammar's websocket implementation to Tornado:
Grab it here:
http://gist.github.com/526746
Or clone my fork of Tornado with websocket included:
http://github.com/pelletier/tornado
Oh and the Pub/Sub protocol is only available in Redis 2.0.0: