Skip to content

Instantly share code, notes, and snippets.

Alexandre Bulté abulte

Block or report user

Report or block abulte

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@abulte
abulte / config.yml
Last active May 7, 2019
cachet-monitor
View config.yml
api:
# cachet url
url: https://status.etalab.studio/api/v1
# cachet api token
token: vo6DRCtqGbtjiHsycM58
insecure: false
# https://golang.org/src/time/format.go#L57
date_format: 02/01/2006 15:04:05 MST
monitors:
- name: datagouvfr-website
@abulte
abulte / python-csv-fail-parsing-csv-doublequote.py
Created Oct 3, 2018
python-csv-fail-parsing-csv-doublequote
View python-csv-fail-parsing-csv-doublequote.py
import re
def _guess_quote_and_delimiter(data, delimiters=None):
"""
Looks for text enclosed between two identical quotes
(the probable quotechar) which are preceded and followed
by the same character (the probable delimiter).
For example:
,'some text',
The quote with the most wins, same with the delimiter.
View types.yml
## The order of the types in this file is important.
## This file exposes an array that defines the order in which the types will be matched.
##
## Always ensure that the extensions (and related) are properly lowercased.
version: '1'
types:
- name: gpkg
extensions:
View .vimrc
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
@abulte
abulte / Dockerfile
Created Nov 1, 2015
Node Dockerfile / Docker-Compose
View Dockerfile
FROM node:0.12
EXPOSE 3000
RUN mkdir /code
WORKDIR /code
COPY package.json /code/
RUN npm install
RUN npm install -g nodemon
ADD . /code
View gist:b28a4532de3aeae70c32
### Keybase proof
I hereby claim:
* I am abulte on github.
* I am abulte (https://keybase.io/abulte) on keybase.
* I have a public key whose fingerprint is 2AF6 528B BA92 D7AC 4F92 DF0B D126 E953 8D0C 3164
To claim this, I am signing this object:
@abulte
abulte / directive.js
Last active Jan 2, 2016
Test fast click efficiency on mobile
View directive.js
module.directive('mesureTime', function() {
return {
restrict: 'A',
// require: 'ngModel',
link: function(scope, elm, attrs, ctrl) {
var timeTouch;
elm.on('click', function() {
if (timeTouch) {
alert(new Date().getTime() - timeTouch, " ms");
} else {
@abulte
abulte / gist:8112151
Last active May 14, 2016
Angular CORS *BAD* pratice
View gist:8112151
myApp.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}
]);
@abulte
abulte / htaccess
Created Dec 24, 2013
WordPress AngularJS CORS setup
View htaccess
# CORS Headers (add this)
<ifModule mod_headers.c>
Header always set Access-Control-Allow-Origin: "*"
Header always set Access-Control-Allow-Methods "POST, GET, PUT, DELETE, OPTIONS"
Header always set Access-Control-Allow-Headers "X-Requested-With, content-type"
</ifModule>
# BEGIN WordPress (you should have this in your original WP .htaccess)
<IfModule mod_rewrite.c>
RewriteEngine On
@abulte
abulte / entity_menu_links-depends-on-i18n_menu.patch
Last active Dec 27, 2015
Patch entity_menu_links to depend on i18n_menu #drupal
View entity_menu_links-depends-on-i18n_menu.patch
You can’t perform that action at this time.