Skip to content

Instantly share code, notes, and snippets.

@flebel
flebel / snippet.sql
Created Dec 24, 2018
list last analyze and vacuum operations on a postgres db
View snippet.sql
SELECT relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze
FROM pg_stat_all_tables
WHERE schemaname = 'public';
@flebel
flebel / admin.py
Last active Mar 11, 2021 — 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.
View admin.py
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::
View allocate_memory.go
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 / sphinx.rb
Last active Mar 8, 2016 — forked from kmullin/sphinx.rb
sphinx.rb
View 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
View keybase.md

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: