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
/*
@description GOOGLE APPS SCRIPT - Simple REST method POST example with payload and header parameters.
@author raphael.alex@gmail.com
@github aelkz
*/
// receives a HTML form element for parsing authentication data.
function getBasicAuth(htmlForm) {
var userAndPassword = htmlForm.username+":"+htmlForm.password;
// encode the string to base 64
<!-- @description The content bellow can be used on GAS - Google Apps Script for embed jquey and bootstrap into your customized html -->
<!-- @author raphael.alex@gmail.com -->
<!-- @github aelkz -->
<!-- Include Twitter Bootstrap and jQuery: -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
@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 / 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 / web.xml
Created November 24, 2016 12:58
JSF 2 (primefaces) + Wildfly 10 + CDI configuration (pre-built deployment descriptor web.xml)
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>JSF CDI Wildfly Demo</display-name>
<context-param>
@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 / index.scss
Created January 28, 2017 00:21
VueJS 2.0 scss configuration with: bulma.io + font-awesome
@charset "utf-8";
@import "./../../../node_modules/bulma/sass/utilities/all";
@import "./../../../node_modules/bulma/sass/base/all";
@import "./../../../node_modules/bulma/sass/elements/all";
@import "./../../../node_modules/bulma/sass/components/all";
@import "./../../../node_modules/bulma/sass/grid/all";
@import "./../../../node_modules/bulma/sass/layout/all";
$fa-font-path: './../../../node_modules/font-awesome/fonts/';
@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 / [FEDORA] nsswitch.conf
Last active May 22, 2017 16:11
/etc/nsswitch.conf + hosts file configuration (to resolve localhost addresses) [FEDORA 25]
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the