Skip to content

Instantly share code, notes, and snippets.

View rixlabs's full-sized avatar

Riccardo Causo rixlabs

View GitHub Profile
@rixlabs
rixlabs / .gitignore.R
Created December 5, 2022 07:29
gitignore file for R project
# Visual Studio Code
*.code-workspace
.project
.classpath
.settings/
.vscode/
# MacOS
.DS_Store
@rixlabs
rixlabs / es_guide_compendium_v551.md
Last active August 16, 2017 06:45
Elasticsearch definitive guide Compendium for v.5.5.1

A compendium to follow the Elasticsearch definitive guide using Elastic search v 5.5.1

Tools for following the guide

I found that for me the easyest way to follow the guide is using a full ELK stack docker compose suite. Here you can find one https://github.com/deviantony/docker-elk

Examples adaptations

  • Getting started
    • Tutorial search
  • More-Complicated Searches(p. 19)
@rixlabs
rixlabs / CustomUserdetailService.java
Created August 29, 2016 15:02
CustomUserdetailService
import ch.lugano.egov.data.AccountRepository;
import ch.lugano.egov.data.StaticUserStore;
import ch.lugano.egov.models.Account;
import ch.lugano.egov.models.CustomUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
@rixlabs
rixlabs / Spring_REST_Params.md
Last active July 13, 2016 09:24
Spring boot the rails way

Pretty simple situation.

My model is 1 Product has many Bookings

the api that I have to expose is just for bookings, the product part is just description and some price that has not to be edited.

so my desired endpoints are:

GET - List of all bookings POST - Create new booking

@rixlabs
rixlabs / injector_trick.js
Last active December 7, 2015 15:14
AngularJS $invoker trick for injecting arguments
//Function that has to receive parameters
//Can be whatever function the injection is like in normal AngularJS CDI so you can inject service or locals
function wrapped(thirdLoc,firstLoc){
console.log('Enter Wrapped');
$timeout(function(){
console.log('Empty inside message');
console.info('Its injected??? ->',thirdLoc);
console.info('Its injected??? ->',firstLoc);
}, 2000);