Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabio José Bohnenberger fabiojb

  • Brazil
View GitHub Profile
@fabiojb
fabiojb / Identifiable.java
Last active Jul 11, 2016
JSF Generic converter for Entities, Enums, etc.
View Identifiable.java
package org.teste.model;
public interface Identifiable<T> {
public T getId();
}
View links simbolicos
View processar parametros independentes de posição com bash
#! /bin/sh -
# idiomatic parameter and option handling in sh
while test $# -gt 0
do
case "$1" in
--opt1) echo "option 1"
;;
--opt2) echo "option 2"
;;
@fabiojb
fabiojb / lightshot.json
Created Oct 24, 2018
Lightshot scoop app manifest
View lightshot.json
{
"homepage": "https://prnt.sc",
"license": {
"identifier": "Freeware",
"url": "https://app.prntscr.com/en/license.html"
},
"url": "https://app.prntscr.com/build/setup-lightshot.exe",
"hash": "455b17124a474bfa512580ba9bcd275dc8e1119482ad604b83b3cb5611a6f73f",
"version": "5.4.0.35",
"extract_dir": "lightshot",
View mvn i
#!/bin/bash
function mvn() {
if [ "$1" = "i" ]; then
command mvn install
else
command mvn $@
fi
}
View install-development-environment-scoop-win.bat
scoop install git
scoop bucket add java
scoop bucket add extras
:: essentials
scoop install 7zip \
openjdk11 \
maven \
vscode \
View SquigglyConfiguration.java
@Configuration
@ConditionalOnClass(ObjectMapper.class)
public class SquigglyAutoconfigure {
@Bean
public FilterRegistrationBean squigglyRequestFilter(ObjectMapper objectMapper) {
Squiggly.init(objectMapper, new RequestSquigglyContextProvider());
FilterRegistrationBean<SquigglyRequestFilter> filter = new FilterRegistrationBean<>();
@fabiojb
fabiojb / toString JSON generator
Last active Jul 23, 2020 — forked from jenslohmann/toString Generator
Java toString() generator for IntelliJ IDEA that generates JSON
View toString JSON generator
public java.lang.String toString() {
#if ( $members.size() > 0 )
#set ( $i = 0 )
return "{\"_class\":\"$classname\", " +
#foreach( $member in $members )
#set ( $i = $i + 1 )
#if ( $i == $members.size() )
#set ( $postfix = "+" )
#else
#set ( $postfix = "+ "", "" + " )
View .vimrc
" Required packages: vim-syntastic flake8
syntax on
filetype plugin on
filetype indent on
set hlsearch
set nowrap
set number
" save file as root