Skip to content

Instantly share code, notes, and snippets.

dino lupo dinolupo

Block or report user

Report or block dinolupo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keeping your site up to date with the GitHub Pages gem

bundle update github-pages

Build your local Jekyll site

bundle exec jekyll serve

dinolupo /
Created Nov 1, 2017 — forked from benbalter/
Example of how to embed a Gist on GitHub Pages using Jekyll.

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

Car car1 = new Car();
Car car2 = new Car();
car2.setModel("Model S");
List<Car> inventory = new ArrayList<>();
dinolupo /
Last active Oct 31, 2017
JSON Collectors are useful when working with streams and filtering a JsonArray with a results into another JsonArray. In the example below you are filtering for a female gender and creating a JsonArray with all the selected names.
JsonArray contacts = ...;
JsonArray femaleNames =
dinolupo /
Last active Oct 30, 2017
How to manage Exceptions in Java EE Rest Services .
import javax.ejb.ApplicationException;
* @author Dino Lupo
@ApplicationException(rollback = true)
public class TestWebException extends WebApplicationException {
dinolupo / dino-babun.zsh-theme
Created Mar 17, 2017
oh-my-zsh theme optimized for babun on windows (works well even on slow machines)
View dino-babun.zsh-theme
# put in ~/.oh-my-zsh/custom
# and choose ZSH_THEME="dino-babun" in ~/.zshrc
local return_code="%(?..%{$fg[red]%}%? %{$reset_color%})"
PROMPT='%{$fg[blue]%}%~%{$reset_color%} \
%{$fg[green]%}$( git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "" )%{$reset_color%} \
$ '
dinolupo /
Created Aug 21, 2016
Maven Javadoc And Sources
# When you’re using Maven in an IDE you often find the need for your IDE to resolve source code and Javadocs for your library dependencies. There’s an easy way to accomplish that goal.
mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc
# The first command will attempt to download source code for each of the dependencies in your pom file.
# The second command will attempt to download the Javadocs.
# Maven is at the mercy of the library packagers here. So some of them won’t have source code packaged and many of them won’t have Javadocs.
dinolupo / Open iTerm2 at Finder
Created Jun 30, 2016
AppleScript that opens a new iTerm2 at a file or directory selected location in Finder
View Open iTerm2 at Finder
on run {input, parameters}
tell application "Finder"
set dir_path to quoted form of (POSIX path of (folder of the front window as alias))
end tell
end run
on CD_to(theDir)
tell application "iTerm"
set _term to create window with default profile
dinolupo / OneDarkXcode.dvtcolortheme
Created May 11, 2016
Xcode Color and Font settings (Dark and Relaxing) using Adobe Source Code Pro Font
View OneDarkXcode.dvtcolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>0.65098 0.698039 0.752941 1</string>
<string>Menlo-Bold - 11.0</string>
<string>0.65098 0.698039 0.752941 1</string>
dinolupo /
Last active Jan 30, 2016
ESP8266 AT Commands

ESP8266 AT Commands

You can’t perform that action at this time.