Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am flebel on github.
  • I am francoislebel (https://keybase.io/francoislebel) on keybase.
  • I have a public key whose fingerprint is E7D3 C122 12C6 70E1 03BC 7CE4 6D44 0326 B9D1 AEBA

To claim this, I am signing this object:

@flebel
flebel / sphinx.rb
Last active March 8, 2016 19:38 — forked from kmullin/sphinx.rb
sphinx.rb
require 'formula'
class Sphinx < Formula
url 'http://sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz'
homepage 'http://www.sphinxsearch.com'
sha256 '054cb86e64bd48997d89386e1224d4405063d9857b2d7c33dc6cc1b9ef6df440'
depends_on 'mysql'
def install
package main
import (
"fmt"
"time"
)
func doEvery(d time.Duration, f func(time.Time)) {
for x := range time.Tick(d) {
SmallSlab = append(SmallSlab, make([]byte, 1024*1024)...)
@flebel
flebel / admin.py
Last active June 27, 2023 09:14 — forked from dokterbob/admin.py
(Django2.0/Py3.6) InlineAdmin mixin limiting the selection of related items according to criteria which can depend on the current parent object being edited.
class LimitedAdminInlineMixin(object):
"""
InlineAdmin mixin limiting the selection of related items according to
criteria which can depend on the current parent object being edited.
A typical use case would be selecting a subset of related items from
other inlines, ie. images, to have some relation to other inlines.
Use as follows::
@flebel
flebel / snippet.sql
Created December 24, 2018 14:24
list last analyze and vacuum operations on a postgres db
SELECT relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze
FROM pg_stat_all_tables
WHERE schemaname = 'public';