Skip to content

Instantly share code, notes, and snippets.

View b4stien's full-sized avatar
🕶️

Bastien Gandouet b4stien

🕶️
  • Bordeaux, France
View GitHub Profile
@b4stien
b4stien / postgresql@15-postgis.rb
Created October 7, 2023 20:06
postgresql@15-postgis.rb
class PostgresqlAT15Postgis < Formula
desc ""
homepage ""
url "https://download.osgeo.org/postgis/source/postgis-3.3.4.tar.gz"
sha256 "9d41eaef70e811a4fe2f4a431d144c0c57ce17c2c1a3c938ddaf4e5a3813b0d8"
license ""
keg_only "conflicts with the `postgis` formula"
depends_on "gpp" => :build
depends_on "pkg-config" => :build

Keybase proof

I hereby claim:

  • I am b4stien on github.
  • I am b4stien (https://keybase.io/b4stien) on keybase.
  • I have a public key whose fingerprint is 19B1 FC6E E4E1 592E 018D 861A D9E2 28D6 FE8A 1C20

To claim this, I am signing this object:

@b4stien
b4stien / output
Last active July 14, 2017 09:25
Simple Rust Service
↪ cargo run
Compiling autodeploy v0.1.0 (file:///Users/bastien/dev/ouihelp/autodeploy)
error[E0106]: missing lifetime specifier
--> src/main.rs:13:13
|
13 | handle: &tokio_core::reactor::Handle,
| ^ expected lifetime parameter
error: aborting due to previous error
@b4stien
b4stien / reducers.js
Created November 17, 2015 14:12
Accessing "globale state" inside a partial reducer
import { combineReducers } from 'redux';
import { ACTION_A, ACTION_B, ACTION_C } from './actions'
function partA(state=true, action) {
switch (action.type) {
case ACTION_A:
return action.randomKey;
PLANE_MANUAL = 'plane_manual'
PLANE_FBW1 = 'fbw1'
PLANE_MAN_MOT_UP = 'man_mot_up'
if FLIGHT_MODE is PLANE_MANUAL:
# bla
elif FLIGHT_MODE is PLANE_FBW1:
# bla2
@b4stien
b4stien / fluentd_to_sql.py
Created September 18, 2015 14:23
Fluentd to SQL
"""Send JSON events from a file to an adequatly structured SQL table.
This script isn't particularly foolproof. It is intented to be invoked
with the full file path as last argument and a RFC-1738 URL to the
database (which will be given to SQLAlchemy) as second to last argument,
eg:
python to_sql.py postgresql://user:pass@host/dbname /path/to/events.json
"""
import re
from packaging.version import VERSION_PATTERN, _parse_letter_version
_regex = re.compile(
r"^\s*" + VERSION_PATTERN + r"\s*$",
re.VERBOSE | re.IGNORECASE,
)
for i in range(789):
print("{0:0=3d}".format(i+1))

Kibana + Elasticsearch

The doc is clueless on how to secure the Kibana <-> Elasticsearch link. The only resource available seems to be http://www.elasticsearch.org/guide/en/kibana/current/_configuration.html, but where is the list of options that I can give to the elasticsearch object ? For instance if I want to pass basic auth stuff with my HTTP request, what options do I have to set ?

It's not directly in Kibana's scope, but CORS with Basic Auth is hard (no wildcard on Access-Control-Allow-Origin...), however for a newcomer this seems to be the way go. It might be helpful to add a small paragraph about it, maybe a list of available resources/links to other docs.

Logstash

With some config Logstash 1.4.1 does not start anymore on Debian 7 (see elastic/logstash#1343), but I'm sure it'll be fixed soon.

@b4stien
b4stien / index.html
Last active January 2, 2016 07:29
Typeahead and disabled state
<!doctype html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="//cdn.jsdelivr.net/typeahead.js/0.9.3/typeahead.min.js"></script>
<link href="https://raw.github.com/hyspace/typeahead.js-bootstrap3.less/7f4fe36c0122f2216f231070a24fb985751157b2/typeahead.css" rel="stylesheet">
</head>