Skip to content

Instantly share code, notes, and snippets.

@steeve
steeve / Dockerfile
Last active December 23, 2015 05:29
ADD start.sh /
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]
function recognitionResult(event) {
for (var i = event.resultIndex; i < event.results.length; ++i) {
if (event.results[i].isFinal) {
connection.send(event.results[i][0].transcript);
}
}
}
to =>
#include <stdlib.h>
#include <stdio.h>
/*
**
*/
#define NBRA (e->a)
#define NBRB (e->b)
#define SIZEA (e->sizea)
#define SIZEB (e->sizeb)
requirejs(files, function () {
$(document).ready(function () {
angular.bootstrap(document, ['app']);
});
});
def iterate_on_attributes():
current = dll.ldap_first_attribute(self._l, self._message, byref(self._berElem))
while current:
yield current
current = dll.ldap_next_attribute(self._l, self._message, self._berElem)
for attrib in iterate_on_attributes():
print attrib
@steeve
steeve / gist:2659696
Created May 11, 2012 13:38
Cassandra stacktrace when deleting/re-creating "missing" keyspaces.
INFO 15:33:43,505 Enqueuing flush of Memtable-schema_keyspaces@1108352425(192/240 serialized/live bytes, 4 ops)
INFO 15:33:43,505 Writing Memtable-schema_keyspaces@1108352425(192/240 serialized/live bytes, 4 ops)
INFO 15:33:43,512 Completed flushing /var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-hc-36-Data.db (256 bytes)
INFO 15:33:43,513 Compacting [SSTableReader(path='/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-hc-34-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-hc-35-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-hc-36-Data.db'), SSTableReader(path='/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-hc-33-Data.db')]
INFO 15:33:43,524 Compacted to [/var/lib/cassandra/data/system/schema_keyspaces/system-schema_keyspaces-hc-37-Data.db,]. 1,498 to 730 (~48% of original) bytes for 3 keys at 0.069618MB/s. Time: 10ms.
ERRO
>>> l = [1, 2]
>>> id(l)
4299501792
>>> l += [3]
>>> l
[1, 2, 3]
>>> id(l)
4299501792
>>>
/*======================================================================================
FXAA Injector danoc1 v1.25 SETTINGS
======================================================================================*/
// TODO: Normalize values to be on a human range scale, whole numbers prefered, decimals usable for micro adjustments
// These values should have min/max limit checks included in their functions, so that the end user doesn't get crazy results
/*------------------------------------------------------------------------------
FILTER SELECTION
------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
FXAA SHADER
------------------------------------------------------------------------------*/
#define FXAA_PC 1
#define FXAA_HLSL_4 1
#define FXAA_QUALITY__PRESET 39
#include "injFX_Settings.h"
#include "injFX_Shaders\Fxaa3_11.h"
@steeve
steeve / gist:1808883
Created February 12, 2012 14:45
FXAA Settings
/*======================================================================================
FXAA Injector danoc1 v1.25 SETTINGS
======================================================================================*/
// TODO: Normalize values to be on a human range scale, whole numbers prefered, decimals usable for micro adjustments
// These values should have min/max limit checks included in their functions, so that the end user doesn't get crazy results
/*------------------------------------------------------------------------------
FILTER SELECTION