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
#!/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
@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) {
@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"
@kristjan
kristjan / add_row.sh
Last active June 10, 2022 09:10
Google Spreadsheet row insertion example
# $auth from auth.sh
# $spreadsheet_id from get_spreadsheets.sh
# $worksheet_id from get_worksheets.sh
curl \
--header "Authorization: GoogleLogin auth=$auth" \
--header 'Content-Type: application/atom+xml' \
-d @data.xml \
-X POST \
"https://spreadsheets.google.com/feeds/list/$spreadsheet_id/$worksheet_id/private/full"
# Example data in data.xml
@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 #-}
@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"