Skip to content

Instantly share code, notes, and snippets.

View RodolpheGohard's full-sized avatar

Rodolphe RodolpheGohard

View GitHub Profile
@RodolpheGohard
RodolpheGohard / data.csv
Created June 16, 2020 07:19
Weather data python exercise
variable Temperature Precipitation Total Wind Speed Wind Direction
2020-06-02T00:00:00 17.308187 0 4.5833187 35.53766
2020-06-02T01:00:00 15.248188 0 7.0533133 10.885529
2020-06-02T02:00:00 13.628188 0 10.137212 3.0127716
2020-06-02T03:00:00 12.798187 0.1 12.831524 4.7636414
2020-06-02T04:00:00 12.738188 0.1 13.271961 10.407715
2020-06-02T05:00:00 10.708188 0 10.293525 10.437485
2020-06-02T06:00:00 8.858188 0 9.87119 273.09406
2020-06-02T07:00:00 9.588188 0 10.389601 270
2020-06-02T08:00:00 11.208188 0 10.474637 262.69424
@RodolpheGohard
RodolpheGohard / getAllMatches.js
Created July 4, 2016 10:32
get all matches of a regex on a string.
// see https://github.com/lodash/lodash/issues/2459
const getAllMatches = (source, regex) => {
const matches = [];
source.replace(regex, function() {
matches.push({
match: arguments[0],
offset: arguments[arguments.length-2],
groups: Array.prototype.slice.call(arguments, 1, -2)
});
angular.module('ngControllerLocals',[]).config(function ($provide) {
$provide.decorator('ngControllerDirective', function ($delegate, $parse, $controller) {
var directive = $delegate[0];
directive.controller = function controllerWrapperForLocals($scope, $attrs, $element, $transclude) {
var ngController = $attrs.ngController;
var locals = {
$scope: $scope,
$attrs: $attrs,
$element: $element,
$transclude: $transclude
@RodolpheGohard
RodolpheGohard / shiny.css
Created February 19, 2015 10:32
shiny text color animation. CAUTION: Hazardous material. Wear suitable eye protection.
.shiny {
color: #FFF;
animation-name: homeCycle;
animation-duration:1s;
animation-direction:alternate;
animation-iteration-count:infinite;
-webkit-animation-name: homeCycle;
-webkit-animation-duration:1s;
-webkit-animation-direction:alternate;
@RodolpheGohard
RodolpheGohard / tnbi18n.js
Last active August 29, 2015 14:07
My a-bit-hacky implementation for automatic partial loading with angular-translate.
(function () {
//NB: parts have been stripped to improve readability
var l10nModule = angular.module( 'tnbl10n', [
'ngResource',
'sessionstatus' //This is a module we use here to get the language in use
] );
//Backend link