Skip to content

Instantly share code, notes, and snippets.

View aelkz's full-sized avatar
👽
working hard

Raphael Abreu aelkz

👽
working hard
View GitHub Profile
@aelkz
aelkz / 0_reuse_code.js
Created March 16, 2016 00:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@aelkz
aelkz / vEquivalents.gs
Created June 7, 2016 18:53 — forked from brucemcpherson/vEquivalents.gs
Google Apps Script equivalents for common VBA function
/** @description
* javaScript/Google Apps script functions that are equivalent to common VBA functions
* in general these provide the same functionality and have the same calling stack
* See http://ramblings.mcpher.com/Home/excelquirks/codeuse for more details
* @author <a href="mailto:bruce@mcpher.com">Bruce McPherson</a><a href="http://ramblings.mcpher.com"> ramblings.mcpher.com</a>
*/
/**
* Removes leading and trailing whitespace
* @param {string|number} v the item to be trimmed
@aelkz
aelkz / EqualsTester.java
Created December 10, 2016 14:25 — forked from rherrmann/EqualsTester.java
Utility class to help unit testing equals() and hashCode(), see also http://www.codeaffine.com/2012/06/25/how-do-you-test-equals-and-hashcode/
/*******************************************************************************
* Copyright (c) 2012 Rüdiger Herrmann
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Rüdiger Herrmann - initial API and implementation
* Frank Appel - code review, idea for assertEquals( T, Object, Object )
@aelkz
aelkz / IntelliJ_IDEA__Perf_Tuning.txt
Created March 14, 2017 14:46 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@aelkz
aelkz / setup-sublime3-for-angular2.md
Created May 1, 2017 21:31 — forked from dwmkerr/setup-sublime3-for-angular2.md
Quickly setup Sublime Text 3 for Angular 2

Quick Setup for Sublime Text 3 for Angular 2

Easy to remember, easy to forget.

Step 1: Download Sublime Text 3

Sublime Text 3 Download

Step 2: Create a bash shortcut

It's nice to be able to run subl in a terminal.

@aelkz
aelkz / Install Spotify on Fedora 64-bit
Last active January 30, 2019 13:22 — forked from olejon/Install Spotify 0.9 on Fedora 64-bit
Install Spotify on Fedora 64-bit
Installation
While it is not officially supported on Fedora or any other RPM-based distributions it is possible to get it to work on Fedora. There are two main ways of installing it:
Using unofficial repositories like the negativo17 repository.
Using Flatpaks
Flatpak
To install it using Flatpak one needs to get the source files required to build it, then build it and add it to one's Flatpak remote and install it. This can be done using the following set of commands:
-----
sudo dnf install flatpak flatpak-builder git make ostree -y
@aelkz
aelkz / gitkraken.sh
Created June 8, 2017 14:05 — forked from pythoninthegrass/gitkraken.sh
Install GitKraken on Fedora 24
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# Extract the Kraken
tar -xvzf gitkraken-amd64.tar.gz
# Move the Kraken
@aelkz
aelkz / install-gradle-centos.sh
Created June 29, 2017 18:12 — forked from parzonka/install-gradle-centos.sh
Install gradle on redhat/centos linux
# installs to /opt/gradle
# existing versions are not overwritten/deleted
# seamless upgrades/downgrades
# $GRADLE_HOME points to latest *installed* (not released)
gradle_version=2.9
wget -N https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip
sudo unzip -foq gradle-${gradle_version}-all.zip -d /opt/gradle
sudo ln -sfn gradle-${gradle_version} /opt/gradle/latest
sudo printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" > /etc/profile.d/gradle.sh
. /etc/profile.d/gradle.sh
package de.tdlabs.training.keycloak;
import static java.util.Arrays.asList;
import javax.ws.rs.core.Response;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.representations.idm.CredentialRepresentation;
@aelkz
aelkz / upgrade-postgres-9.4-to-9.5.md
Created September 23, 2017 17:01 — forked from Komzpa/upgrade-postgres-9.4-to-9.5-to-9.6-to-10.md
Upgrading PostgreSQL from 9.4 to 9.5 when upgrading Ubuntu 14.10 to 16.04

TL;DR

sudo pg_dropcluster 9.5 main --stop
sudo service postgresql stop
sudo pg_upgradecluster -m upgrade -k 9.4 main
sudo su postgres -c "/usr/lib/postgresql/9.5/bin/vacuumdb --all --analyze-in-stages"
sudo pg_dropcluster 9.4 main