This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mvryan.http; | |
import static io.netty.buffer.Unpooled.copiedBuffer; | |
import io.netty.bootstrap.ServerBootstrap; | |
import io.netty.channel.ChannelFuture; | |
import io.netty.channel.ChannelHandlerContext; | |
import io.netty.channel.ChannelInboundHandlerAdapter; | |
import io.netty.channel.ChannelInitializer; | |
import io.netty.channel.ChannelOption; | |
import io.netty.channel.EventLoopGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JAVA=`which java` | |
JAVA_VERSION=$("$JAVA" -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed 's/\(.*\)\.\(.*\)\..*/\1\2/') | |
if [ "$JAVA_VERSION" -lt 17 ]; then | |
echo "Invalid Java version found - must be at least 1.7" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO my_table (unique_but_non_indexed_col1, col2, col3) | |
SELECT * FROM (SELECT 'unique_val1', 'val2', 'val3') AS tmp | |
WHERE NOT EXISTS ( | |
SELECT id FROM my_table WHERE unique_but_non_indexed_col1='unique_val1' | |
) LIMIT 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<profiles version="2"> | |
<profile kind="CleanUpProfile" name="Matt's Profile" version="2"> | |
<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/> | |
<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/> | |
<setting id="cleanup.organize_imports" value="true"/> | |
<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/> | |
<setting id="cleanup.format_source_code_changes_only" value="false"/> | |
<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/> | |
<setting id="cleanup.add_generated_serial_version_id" value="false"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<profiles version="12"> | |
<profile kind="CodeFormatterProfile" name="Matt's Profile" version="12"> | |
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> | |
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git commamands simplified | |
alias gst='git status' | |
alias gco='git checkout' | |
alias gci='git commit' | |
alias grb='git rebase' | |
alias gbr='git branch' | |
alias glg='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"' | |
alias glg2='git log --date-order --all --graph --name-status --format="%C(green)%H%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"' | |
## PROMPT ## |