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 / [FEDORA] gitkraken
Last active November 14, 2023 05:50
How to install gitkraken on Fedora [25,26,27] + launcher icon
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# copy the downloaded file into /opt directory
cp gitkraken-amd64.tar.gz /opt/
cd /opt
##[IMPORTING GPG KEY]
# https://getfedora.org/pt/keys/faq/
```
rpm --import PUBKEY ...
```
##[Adding a DNF Repository]
==============
@aelkz
aelkz / pom.xml
Created November 23, 2016 01:31
JSF 2 (primefaces) + Wildfly 10 + CDI configuration (pre-built maven pom.xml)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.aelkz</groupId>
<artifactId>JSFCDIWildlfyDemo</artifactId>
<version>1.0-SNAPSHOT</version>
@aelkz
aelkz / curl-get-status-code-and-response-body.sh
Created February 6, 2020 19:56 — forked from maxcnunes/curl-get-status-code-and-response-body.sh
Curl - Get status code and response body
URL="http://stackoverflow.com/"
# store the whole response with the status at the and
HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL)
# extract the body
HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g')
# extract the status
HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
@aelkz
aelkz / psensor-install-f28.sh
Created March 18, 2019 18:11 — forked from pgnunes/psensor-install-f28.sh
Install Psensor on Fedora 28
#/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "Please run this script as root"
exit 1
fi
dnf install -y gcc wget gtk3-devel GConf2-devel cppcheck libatasmart-devel libcurl-devel json-c-devel libmicrohttpd-devel help2man libnotify-devel libgtop2-devel make
wget -O /tmp/psensor-last-stable.tar.gz http://wpitchoune.net/psensor/files/psensor-last-stable.tar.gz
tar -xf /tmp/psensor-last-stable.tar.gz -C /tmp
rm -rf /tmp/psensor-last-stable.tar.gz
@aelkz
aelkz / Java_GC_Tuning.md
Created September 13, 2022 19:19 — forked from thikade/Java_GC_Tuning.md
Java GC tuning

determine JVM defaults

java -XshowSettings:vm -XX:+PrintFlagsFinal -version

Default Java 1.8.0_275: (-XX:+UseParallelGC)

$ java -XshowSettings:vm -XX:+PrintFlagsFinal  -version 2>&1 | \
  grep -E 'GCTimeRatio|HeapFreeRatio|MaxRAM|MaxHeapSize|UnlockExperimentalVMOptions|UseCGroupMemoryLimitForHeap'
    uintx DefaultMaxRAMFraction                     = 4                                   {product}
@aelkz
aelkz / README.md
Created July 27, 2022 12:22 — forked from kevprice83/README.md
3scale Developer portal custom signup flows

Dynamic 3scale Developer Portal signup templates

There are 4 custom signup flows included in the parent homepage. These flows are included into the homepage using Liquid tags such as {% include 'partial name' %} because the flows are separated out into individual partials. The partials can be included in your 3scale portal individually or all together depending on which flows you want to enable in your portal and for ease of switching between flows as and when needed.

NOTE: If you prefer you can create a separate page to render the subscription forms to the different Services. This would be particularly useful if you want to allow multiple applications per account for the Custom Field & Group Membership Flows.

How does the 3scale signup work?

The Basics

A developer can sign up to subscribe to an API service in various ways

@aelkz
aelkz / sublime-text-macos-context-menu.md
Created May 4, 2022 02:22 — forked from idleberg/sublime-text-macos-context-menu.md
“Open in Sublime Text” in macOS context-menu

This list has been updated for Big Sur (and later). Since I don't use these versions, this guide might still need further improvements. For older macOS versions, please see this older revision.

Open in Sublime Text

  • Open Automator
  • Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments
@aelkz
aelkz / ParseHeapDump.sh
Created June 2, 2019 13:11 — forked from mrbuk/ParseHeapDump.sh
MAT headless mode
#!/bin/sh
#
# This script parses a heap dump.
#
# Usage: ParseHeapDump.sh <path/to/dump.hprof> [report]*
#
# The leak report has the id org.eclipse.mat.api:suspects
# The top component report has the id org.eclipse.mat.api:top_components
#