Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View netodevel's full-sized avatar
🏠
Working from home

José Vieira Neto netodevel

🏠
Working from home
  • São Paulo, Brasil
View GitHub Profile
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 {
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.8.0</version>
</dependency>
@netodevel
netodevel / sample.java
Created July 5, 2019 14:28
integration cli error
public class TemplateCommand extends OptionParsingCommand {
public TemplateCommand(String name, String description, OptionHandler handler) {
super(name, description, handler);
}
@Override
public String getUsageHelp() {
return "[options] <template>";
}
class EventFragment {
companion object {
var fragmentEventsView : FragmentEventsView? = null
fun register(fragmentEventsView: FragmentEventsView) {
this.fragmentEventsView = fragmentEventsView
}
fun unRegister() {
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
# 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
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 12:42 — forked from andreyvit/tmux.md
tmux cheatsheet

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

/*
data-req="true"
data-validation="date/cpf/email/placa"
data-eq-value=""
*/
function vform(id) {
var obj = {
status: true,
validation: {}
};
echo "setup deploy"
function setup() {
mkdir -p deploy
cd deploy
mkdir -p develop
mkdir -p production
}
if [ -d /home/{YOUR_USER}/deploy ]; then
echo "YES";
else