Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

José Vieira Neto NetoDevel

🏠
Working from home
View GitHub Profile
View ElasticSearchConfig.java
import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ElasticsearchConfig {
View pom.xml
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.8.0</version>
</dependency>
@NetoDevel
NetoDevel / sample.java
Created Jul 5, 2019
integration cli error
View sample.java
public class TemplateCommand extends OptionParsingCommand {
public TemplateCommand(String name, String description, OptionHandler handler) {
super(name, description, handler);
}
@Override
public String getUsageHelp() {
return "[options] <template>";
}
View sample.kt
class EventFragment {
companion object {
var fragmentEventsView : FragmentEventsView? = null
fun register(fragmentEventsView: FragmentEventsView) {
this.fragmentEventsView = fragmentEventsView
}
fun unRegister() {
@NetoDevel
NetoDevel / PRA VOCE CURIOSO!
Last active Aug 5, 2017
FACA O DECODE DO BASE64
View PRA VOCE CURIOSO!
/9j/4AAQSkZJRgABAQEASABIAAD//gBCRmlsZSBzb3VyY2U6IGh0dHA6Ly9wZXNxdWlzYS5sYS93
aWtpL0FycXVpdm86TmVnYW9fZGFfcGljb25hLmpwZ//bAEMABgQFBgUEBgYFBgcHBggKEAoKCQkK
FA4PDBAXFBgYFxQWFhodJR8aGyMcFhYgLCAjJicpKikZHy0wLSgwJSgpKP/bAEMBBwcHCggKEwoK
EygaFhooKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKP/A
ABEIAcABLAMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAFAgMEBgcBAAj/xABDEAACAQIF
AgQEBAUDBAEDAwUBAgMEEQAFEiExQVEGEyJhFHGBkQcjMqFCscHR8BVS4SQzYvEWCHKCJTSSNUNj
c6L/xAAaAQACAwEBAAAAAAAAAAAAAAABAgADBAUG/8QAKBEAAgICAgICAgMBAAMAAAAAAAECEQMh
EjEEQRNRBSIyYXEjBhSB/9oADAMBAAIRAxEAPwDR4s7QKglooyETy1seRbYG/bc45FnCxOjxUaKy
ElTrvbi3TpYcYEaSPfC9OO58UDkc5BVc5KkaKaMcc79CLccb3x5M3a4/IRbHWGQlTq02ue/yt0wL
GOgHpifFAnORNjzKSOYvp1roSMKzE7KQRc9dx++FPmTedM4hQmTTfUS1yp2Ldz77YgBScKI74Pxw
View list_replication.ex
defmodule Solution do
def main() do
n = IO.gets("") |> String.strip |> String.to_integer
IO.gets("") |> to_list(n)
end
def read_lines
IO.gets("")
end
View gist:b791a07e7623fbba5aee84166cd3547b
# A simple Dockerfile for a RoR application
FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /your-applicatioin
WORKDIR /your-application
ADD Gemfile /your-application/Gemfile
View animate imageview
imageViewProfile = (ImageView) findViewById(R.id.image_profile);
int arcWidth = 15;
mAnimatedDrawable = new CircularAnimatedDrawable(imageViewProfile, arcWidth, Color.WHITE);
int offset = (imageViewProfile.getLayoutParams().width - imageViewProfile.getLayoutParams().height) / 2;
int left = offset;
int right = imageViewProfile.getLayoutParams().width - offset;
int bottom = imageViewProfile.getLayoutParams().height;
@NetoDevel
NetoDevel / tmux.md
Created May 4, 2017 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
View ionic-validation.js
/*
data-req="true"
data-validation="date/cpf/email/placa"
data-eq-value=""
*/
function vform(id) {
var obj = {
status: true,
validation: {}
};
You can’t perform that action at this time.