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
@alexlopes
alexlopes / open-vm-tools-vmware-ubuntu-sharing.md
Created October 26, 2018 13:34 — forked from darrenpmeyer/open-vm-tools-vmware-ubuntu-sharing.md
open-vm-tools and VMWare Shared Folders for Ubuntu guests

(NB: adapted from this Ask Ubuntu thread -- tested to work with Ubuntu 16 LTS branches and Ubuntu 17.10)

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@alexlopes
alexlopes / docker-stackes.yml
Last active September 20, 2018 02:37
Docker Stack
## Elastic Search
version: "3.2"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
ports:
- 9600:9200
- 9300:9300
environment:
@alexlopes
alexlopes / git_tricks.md
Last active September 6, 2018 00:39
git_tricks

Deletin branches

Deleting local branches in Git

git branch -d feature/login

Deleting remote branches in Git

git push origin --delete feature/login
@alexlopes
alexlopes / windows_bash.md
Last active August 23, 2018 17:37
Windows Bash

sudo apt-get install dirmngr -y

sudo apt-get install sshpass -y

@alexlopes
alexlopes / oracle_plsql.md
Created July 30, 2018 17:52
Oracle PLSQL Tricks

Sleep for PLSQL

DECLARE
                      IN_TIME INT := 60;
                      V_NOW DATE;
                    BEGIN
                      DBMS_OUTPUT.PUT_LINE(''START: '' || to_char(SYSDATE, ''YYYY-MM-DD HH24:MI:SS''));

 SELECT SYSDATE 
@alexlopes
alexlopes / maven_tricks.md
Last active July 24, 2018 21:27
Maven Trick

Skip javadoc and tests for Maven Release

mvn -X -Darguments="-Dmaven.javadoc.skip=true -Dmaven.test.skipTests=true -Dmaven.test.skip=true" -P release-mode release:prepare

https://dzone.com/articles/configuring-the-maven-release-plugin-to-skip-tests`

If you would like to avoid executing tests in the Prepare phase, then you need to run it like so:

mvn -DpreparationGoals=clean release:prepare

@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

@alexlopes
alexlopes / javascript.md
Last active June 21, 2018 21:35
JavaScript Tricks - alexlopes

Iterate over "[a,b,c]"

	$("#selector_one").find("input:checkbox[name=mycheckboxes]").each(function(){
		var current_component = $(this)
		$("#selector_two").val().replace(/[\[\]']+/g,'').split(',').forEach(function (item) {
			if (item == current_component.val().toLocaleLowerCase()) {
				$(current_component).prop('checked', true);
			}
 });	
@alexlopes
alexlopes / spring_tricks.md
Last active June 15, 2018 17:34
Spring Tricks

Run

package something;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

Slack Notification for ASUS phone