Skip to content

Instantly share code, notes, and snippets.

View FGRibreau's full-sized avatar
✍️
writing "#NoBullshit Tech-Lead" book https://getnobullshit.com

Francois-Guillaume Ribreau FGRibreau

✍️
writing "#NoBullshit Tech-Lead" book https://getnobullshit.com
View GitHub Profile
@antirez
antirez / mem.txt
Created September 15, 2016 15:17
127.0.0.1:6379> memory help
1) "MEMORY USAGE <key> [SAMPLES <count>] - Estimate memory usage of key"
2) "MEMORY OVERHEAD - Show memory usage details"
127.0.0.1:6379> memory overhead
1) "total.allocated"
2) (integer) 1014672
3) "startup.allocated"
4) (integer) 962496
5) "replication.backlog"
@MaxGabriel
MaxGabriel / redis-yesod.md
Last active March 3, 2016 20:25
Connecting to Redis from Yesod

Connecting to Redis from Yesod

This is a quick run-through of how I connected to Redis from a Yesod site (which used the default scaffolding). There isn't much specific to Redis here, so this information should apply to connecting to any database or service from Yesod.

Background: Basics of Hedis

First, a brief intro of the basics of Hedis:

{-# LANGUAGE OverloadedStrings #-}
@codekoala
codekoala / PKGBUILD
Last active December 17, 2015 15:08
Customized PKGBUILD for btsync with user-specific profiles
# Maintainer: Dongsheng Cai <http://dongsheng.org>
# Maintainer: ava1ar < mail(at)ava1ar(dot)info >
pkgname=btsync
pkgver=1.0.134
pkgrel=4
pkgdesc="Automatically sync files via secure, distributed technology"
license=("custom")
arch=('i686' 'x86_64')
url="http://labs.bittorrent.com/experiments/sync.html"
@tristanwietsma
tristanwietsma / index.html
Created April 30, 2013 04:44
Redis to websocket relay Relays a Redis channel to a websocket, or multiple channels to multiple sockets.
<html>
<head>
<title>Redis Listener</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
var conn;
var msg = $("#msg");
var log = $("#log");
function appendLog(msg) {
#!/bin/sh
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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
@joseanpg
joseanpg / extend_and_merge.js
Created August 15, 2012 21:55
Extend and Merge (don't overwrite properties that reference objects)
(function(carrier){
var hasOwn = Object.prototype.hasOwnProperty;
var slice = Array.prototype.slice;
function extend(obj,src){
for (var p in src){
if (hasOwn.call(src,p)) {
if (p in obj && typeof obj[p] === 'object' && obj[p]) {
extend(obj[p],src[p]);