Skip to content

Instantly share code, notes, and snippets.

View siscia's full-sized avatar

Simone Mosciatti siscia

View GitHub Profile
free; for i in {1..11000}; do if [ $(( $i % 1000 )) -eq 0 ]; then echo $i; free; fi; ./redis-cli REDISQL.CREATE_D
B DB$i > /dev/null; ./redis-cli REDISQL.EXEC DB$i "CREATE TABLE foo(a, b, c); CREATE TABLE bar(a, b, c)" > /dev/null; done
free;
for i in {1..11000}; do
if [ $(( $i % 1000 )) -eq 0 ]; then
echo $i;
free;
fi;

Start thin images

Assuming you have already follow the [geneal guide on thin image on the cvmfs documentation.][graph-driver-doc]

Hence, we are assuming that the docker daemon is running with the graph-driver plugin installed.

After the plugin is installed you should be able to run thin-images in your local docker.

This page show first how to mount the CVMFS repository that backs the thin images and then how to obtain the thin images themselves.

@siscia
siscia / gist:3111539
Created July 14, 2012 14:12
Simple first approach to a DAG
(ns bayle.core
(require clojure.set))
(defprotocol NODE
(change [this key new-value])
(add-parent [this new-parent])
(add-non-descendent [this new])
(node? [this])
(add-chile [this child]))
Hi All,
I am facing a quite interesting problem.
I am trying to implement a new virtual table, everything seems alright, I receive SQLITE_OK code on the registration but as soon as I try to use the vtab that I just created I only get an error: "no such module: $NAME_VTAB"
It seems to me that I followed the documentation quite closely, moreover, I am not doing weird cast or particular alchemy with the code, with the exception that it is rust code and not plain C.
What I do is quite simple, I just call `sqlite3_create_module_v2` passing all the parameter.
@siscia
siscia / benchamark1
Created April 17, 2018 21:10
RediSQL benchmarks
Last login: Tue Apr 17 20:40:55 2018 from 90.41.4.210
ubuntu@ip-172-31-14-12:~$
ubuntu@ip-172-31-14-12:~$
ubuntu@ip-172-31-14-12:~$ cd redis-4.0.9/src/
ubuntu@ip-172-31-14-12:~/redis-4.0.9/src$ ./redis-cli
127.0.0.1:6379> REDISQL.CREATE_DB DB
OK
127.0.0.1:6379> REDISQL.EXEC DB "create table test(a int, b int);"
1) DONE
#include <stdio.h>
#include <stdlib.h>
#include "hiredis.h"
int main() {
redisContext *c;
redisReply *reply;
(ns base-conversion.core)
(def characters
(concat (map char (range 48 58)) (map char (range 65 91))))
(def conversion-table
(zipmap
characters
(range)))
/* automatically generated by rust-bindgen */
#[repr(C)]
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
impl <T> __BindgenUnionField<T> {
#[inline]
pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) }
#[inline]
pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) }
#[inline]
extern crate rusqlite;
extern crate libsqlite3_sys as sqlite3;
use std::io::{self, Read};
use std::path::Path;
use std::mem;
use std::ptr;
use std::ffi::{CString, CStr};
use rusqlite::Connection;
------ThisIsTheBoundary1234567890
Content-Disposition: form-data; name="source"; filename="image-vaun.png"
Content-Type: PNG
‰PNG

IHDRUS‰UŸ3 IDATx^Ô½w°e×uæ·_Î9õëÜ@£ÑÔH$€’‡’(SV©Tc‘TÉ,—ÿ»<å0v©,j¦J®r©ÆÖhä0Jòhþ°MٜQ %Š–(fBÌ ¡»N¯_Î9øû­µ÷9ûÞw_÷ë$A8}ï»áœ}ö^ûÛߊ»nGðwø¸ÙÅWW×CkksØÜÜ4µ©©ÁZËß«ë¡¥­5Ì/¯†æƦ°¼¼ž}ö›áâŋai~!üÜÏý\8qüˆ}¿.Þc}Õ½¦÷o¥ >õËgC_ogèïë