Skip to content

Instantly share code, notes, and snippets.

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

Alex Lopes alexlopes

🏠
Working from home
View GitHub Profile

#Find in content files

grep -rnw '/path/to/somewhere/' -e "pattern"

@alexlopes
alexlopes / designer.html
Last active November 8, 2016 01:52
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@alexlopes
alexlopes / designer.html
Created November 9, 2016 21:02
designer
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@alexlopes
alexlopes / designer.html
Last active November 9, 2016 21:04
designer
<link rel="import" href="../paper-calculator/paper-calculator.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@alexlopes
alexlopes / elasticsearch.yml
Created March 8, 2017 03:10
elastic search openshift
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
@alexlopes
alexlopes / elasticsearch_tricks.md
Last active March 8, 2017 06:07
elasticsearch tricks
@alexlopes
alexlopes / rabbitmq_api.md
Created March 14, 2017 14:30
RabbitMQ - API

How to create a user and set roles

  1. Creating the user
  • BasicAuth for a admin user
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Basic ????" -H "Cache-Control: no-cache" -d '{"password":"yourpwdhere", "tags":"monitoring"}' "http://RABBITMQ_IP:15672/api/users/username_here"
@alexlopes
alexlopes / docker_windows_tricks.md
Last active May 8, 2017 20:28
Docker For Windows Tricks

Docker Swarm

  1. You must install Bash for Windows
  2. Open it and export the DOCKER_HOST (value should be the Docker for Windows daemon address)
export DOCKER_HOST=tcp://localhost:2375

or ...

@alexlopes
alexlopes / debian_tricks.md
Last active July 3, 2018 21:35
Debian Tricks

HTTP Proxy for apt-get

echo "Acquire::http::Proxy \"http://proxy:8080\";" >> /etc/apt/apt.conf.d/70debconf

Install Java and Maven

#!/bin/bash
set -e
GVERSION="1.7"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"