Skip to content

Instantly share code, notes, and snippets.

@gsitgithub
Created August 11, 2017 13:09
Show Gist options
  • Save gsitgithub/36cb7c6000cbcaf522de2fb60223e432 to your computer and use it in GitHub Desktop.
Save gsitgithub/36cb7c6000cbcaf522de2fb60223e432 to your computer and use it in GitHub Desktop.
java libs and tools info
https://vpsfree.org
https://vestacp.com/
http://browserstack.com
Good analysis. People rush to “optimize the code” but they don’t bother to measure or look for the best algorithm.
Bug Hunting
https://amybughunter.files.wordpress.com/2013/01/defect_tracking_decide1.jpg
# mssql jdbc driver installation in maven for now on Nexus repository
mvn install:install-file -Dfile=sqljdbc4.jar -Dpackaging=jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0
mvn install:install-file -Dfile=sqljdbc41.jar -Dpackaging=jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc41 -Dversion=4.1
==========================================================
Run this on the commandline; it should solve issue:
# sudo iptables -A INPUT -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT
To do a specific port:
# sudo iptables -A INPUT -p <tcp OR udp> <--dport OR --sport> <port> -j ACCEPT
INPUT is the chain for incoming traffic. -p is protocol (either tcp or udp --dport or --sport specify allowing for destination or source port. -j is "jump" and its where you ACCEPT, REJECT, or DROP the packet(s)
Details on iptables can be found by reading the man page. Since you're a beginner you'll probably find this useful: http://www.netfilter.org/documentation/HOWTO//packet-filtering-HOWTO.html
==========================================================
Softwares Servlet version JSP min Java
0. Maven 3.2.5 JDK 1.5
0. Maven 3.3 and up JDK 1.7 or above
1. Netbeans 8.0.2 (JDK) 7 Update 10 (or later) or JDK 8 is
required to install NetBeans IDE.
2. Tomcat 7.* Servlet 3.0 JSP 2.2 Java 6 or later JRE, Servlet 3.0, JSP 2.2
3. Tomcat 8.* Servlet 3.1 JSP 2.3 Java 7 or later JRE, Servlet 3.1, JSP 2.3
4. Spring 4.x JDK 6 update 25 or higher, as of Spring 4.0. *
Servlet 3.0 (2.5 supported for deployment), JPA 2.0,
Bean Validation 1.0, JSF 2.0, JCache 1.0, JDO 3.0 .
Tomcat 6.0.33 / 7.0.20 / 8.0.9, Jetty 7.5, JBoss AS 6.1 ,
GlassFish 3.1, Oracle WebLogic 10.3.4 with JPA 2.0, IBM WebSphere 7.0.0.9 with JPA 2.0
Note that Spring 3.0.x and 3.1.x lines have been retired already.
5. Spring 4.1.0.RELEASE Java 8 (as well as 6 and 7), JavaEE 6 and 7,
JMS 2.0, JTA 1.2, JPA 2.1, Bean Validation 1.1,
and JSR-236 Concurrency Utilities
5. Spring 3.1.0.RELEASE Java 5, and Java 6 is fully supported.
6. Spring 2.5.0.RELEASE Java 1.4.2, Java 5 and Java 6 are supported
7. Hibernate 3.2.x Java 1.5 or greater
8. Hibernate 4.3.8.Final Java 6 or higher
(building Hibernate from source requires JDK 7 due to a bug in the JDK 6 compiler).
9. Jetty 9.2 Servlet 3.1 JSP 2.3 Java 1.7, Servlet 3.1, JSp 2.3
10. Jetty 8.x Servlet 3 JSP 2.2 Java 1.6, Servlet 3.0, JSp 2.2
11. Jetty 7.x Servlet 2.5 JSP 2.1 Java 1.5, Servlet 2.5, JSp 2.1
12. Eclipse Juno (4.4) Java 7 JRE/JDK is required for most of the Luna package
downloads based on Eclipse 4.4
14. Eclipse Kepler (4.3) Java 6 JRE/JDK is recommended for Eclipse 4.3
15. Apache commonsDBCP 2.x DBCP 2 compiles and runs under Java 7 only (JDBC 4.1).
DBCP 2 binaries should be used by applications running under Java 7.
16. Apache commonsDBCP 1.4 DBCP 1.4 compiles and runs under Java 6 only (JDBC 4).
DBCP 1.4 binaries should be used by applications running under Java 6.
17. jackson 2.7.5 Runs on JRE 6 but not compile
18. jackson 2.8.x and up JRE 7 or above
DI: https://github.com/zsoltherpai/feather | https://github.com/google/tiger | https://github.com/osglworks/java-di
Reflection: https://github.com/EsotericSoftware/reflectasm
Converter : https://github.com/brettwooldridge/HikariJSON
MVC : https://github.com/actframework/actframework, https://github.com/osglworks/java-mvc
tomcat 8 vs 8.5 >> Locale: "en-US, en" vs "en-US" >> 8.5 Tomcat's cookie processing being changed to a RFC 6265 compliant implementation by default in 8.5, which does not allow space (character 32), among others.
<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />
Command alias- Cmdlet name Poweshell - Description of command
% - ForEach-Object - Performs an operation against each item in a collection of input objects.
? - Where-Object - Selects objects from a collection based on their property values.
ac - Add-Content - Appends content, such as words or data, to a file.
asnp - Add-PSSnapIn - Adds one or more Windows PowerShell snap-ins to the current session.
cat - Get-Content - Gets the contents of a file.
cd - Set-Location - Sets the current working location to a specified location.
chdir - Set-Location - Sets the current working location to a specified location.
clc - Clear-Content - Deletes the contents of an item, but does not delete the item.
clear - Clear-Host - Clears the display in the host program.
clhy - Clear-History - Deletes entries from the command history.
cli - Clear-Item - Deletes the contents of an item, but does not delete the item.
clp - Clear-ItemProperty - Deletes the value of a property but does not delete the property.
cls - Clear-Host - Clears the display in the host program.
clv - Clear-Variable - Deletes the value of a variable.
cnsn - Connect-PSSession - Reconnects to disconnected sessions
compare - Compare-Object - Compares two sets of objects.
copy - Copy-Item - Copies an item from one location to another.
cp - Copy-Item - Copies an item from one location to another.
cpi - Copy-Item - Copies an item from one location to another.
cpp - Copy-ItemProperty - Copies a property and value from a specified location to another location.
curl - Invoke-WebRequest - Gets content from a webpage on the Internet.
cvpa - Convert-Path - Converts a path from a Windows PowerShell path to a Windows PowerShell provider path.
dbp - Disable-PSBreakpoint - Disables the breakpoints in the current console.
del - Remove-Item - Deletes files and folders.
diff - Compare-Object - Compares two sets of objects.
dir - Get-ChildItem - Gets the files and folders in a file system drive.
dnsn - Disconnect-PSSession - Disconnects from a session.
ebp - Enable-PSBreakpoint - Enables the breakpoints in the current console.
echo - Write-Output - Sends the specified objects to the next command in the pipeline. If the command is the last command in the pipeline, the objects are displayed in the console.
epal - Export-Alias - Exports information about currently defined aliases to a file.
epcsv - Export-Csv - Converts objects into a series of comma-separated (CSV) strings and saves the strings in a CSV file.
epsn - Export-PSSession - Imports commands from another session and saves them in a Windows PowerShell module.
erase - Remove-Item - Deletes files and folders.
etsn - Enter-PSSession - Starts an interactive session with a remote computer.
exsn - Exit-PSSession - Ends an interactive session with a remote computer.
fc - Format-Custom - Uses a customized view to format the output.
fl - Format-List - Formats the output as a list of properties in which each property appears on a new line.
foreach - ForEach-Object - Performs an operation against each item in a collection of input objects.
ft - Format-Table - Formats the output as a table.
fw - Format-Wide - Formats objects as a wide table that displays only one property of each object.
gal - Get-Alias - Gets the aliases for the current session.
gbp - Get-PSBreakpoint - Gets the breakpoints that are set in the current session.
gc - Get-Content - Gets the contents of a file.
gci - Get-ChildItem - Gets the files and folders in a file system drive.
gcm - Get-Command - Gets all commands.
gcs - Get-PSCallStack - Displays the current call stack.
gdr - Get-PSDrive - Gets drives in the current session.
ghy - Get-History - Gets a list of the commands entered during the current session.
gi - Get-Item - Gets files and folders.
gjb - Get-Job - Gets Windows PowerShell background jobs that are running in the current session.
gl - Get-Location - Gets information about the current working location or a location stack.
gm - Get-Member - Gets the properties and methods of objects.
gmo - Get-Module - Gets the modules that have been imported or that can be imported into the current session.
gp - Get-ItemProperty - Gets the properties of a specified item.
gps - Get-Process - Gets the processes that are running on the local computer or a remote computer.
group - Group-Object - Groups objects that contain the same value for specified properties.
gsn - Get-PSSession - Gets the Windows PowerShell sessions on local and remote computers.
gsnp - Get-PSSnapIn - Gets the Windows PowerShell snap-ins on the computer.
gsv - Get-Service - Gets the services on a local or remote computer.
gu - Get-Unique - Returns unique items from a sorted list.
gv - Get-Variable - Gets the variables in the current console.
gwmi - Get-WmiObject - Gets instances of Windows Management Instrumentation (WMI) classes or information about the available classes.
h - Get-History - Gets a list of the commands entered during the current session.
history - Get-History - Gets a list of the commands entered during the current session.
icm - Invoke-Command - Runs commands on local and remote computers.
iex - Invoke-Expression - Runs commands or expressions on the local computer.
ihy - Invoke-History - Runs commands from the session history.
ii - Invoke-Item - Performs the default action on the specified item.
ipal - Import-Alias - Imports an alias list from a file.
ipcsv - Import-Csv - Creates table-like custom objects from the items in a CSV file.
ipmo - Import-Module - Adds modules to the current session.
ipsn - Import-PSSession - Imports commands from another session into the current session.
irm - Invoke-RestMethod - Sends an HTTP or HTTPS request to a RESTful web service.
ise - powershell_ise.exe - Explains how to use the PowerShell_ISE.exe command-line tool.
iwmi - Invoke-WMIMethod - Calls Windows Management Instrumentation (WMI) methods.
iwr - Invoke-WebRequest - Gets content from a web page on the Internet.
kill - Stop-Process - Stops one or more running processes.
lp - Out-Printer - Sends output to a printer.
ls - Get-ChildItem - Gets the files and folders in a file system drive.
man - help - Displays information about Windows PowerShell commands and concepts.
md - mkdir - Creates a new item.
measure - Measure-Object - Calculates the numeric properties of objects, and the characters, words, and lines in string objects, such as files of text.
mi - Move-Item - Moves an item from one location to another.
mount - New-PSDrive - Creates temporary and persistent mapped network drives.
move - Move-Item - Moves an item from one location to another.
mp - Move-ItemProperty - Moves a property from one location to another.
mv - Move-Item - Moves an item from one location to another.
nal - New-Alias - Creates a new alias.
ndr - New-PSDrive - Creates temporary and persistent mapped network drives.
ni - New-Item - Creates a new item.
nmo - New-Module - Creates a new dynamic module that exists only in memory.
npssc - New-PSSessionConfigurationFile - Creates a file that defines a session configuration.
nsn - New-PSSession - Creates a persistent connection to a local or remote computer.
nv - New-Variable - Creates a new variable.
ogv - Out-GridView - Sends output to an interactive table in a separate window.
oh - Out-Host - Sends output to the command line.
popd - Pop-Location - Changes the current location to the location most recently pushed to the stack. You can pop the location from the default stack or from a stack that you create by using the Push-Location cmdlet.
ps - Get-Process - Gets the processes that are running on the local computer or a remote computer.
pushd - Push-Location - Adds the current location to the top of a location stack.
pwd - Get-Location - Gets information about the current working location or a location stack.
r - Invoke-History - Runs commands from the session history.
rbp - Remove-PSBreakpoint - Deletes breakpoints from the current console.
rcjb - Receive-Job - Gets the results of the Windows PowerShell background jobs in the current session.
rcsn - Receive-PSSession - Gets results of commands in disconnected sessions.
rd - Remove-Item - Deletes files and folders.
rdr - Remove-PSDrive - Deletes temporary Windows PowerShell drives and disconnects mapped network drives.
ren - Rename-Item - Renames an item in a Windows PowerShell provider namespace.
ri - Remove-Item - Deletes files and folders.
rjb - Remove-Job - Deletes a Windows PowerShell background job.
rm - Remove-Item - Deletes files and folders.
rmdir - Remove-Item - Deletes files and folders.
rmo - Remove-Module - Removes modules from the current session.
rni - Rename-Item - Renames an item in a Windows PowerShell provider namespace.
rnp - Rename-ItemProperty - Renames a property of an item.
rp - Remove-ItemProperty - Deletes the property and its value from an item.
rsn - Remove-PSSession - Closes one or more Windows PowerShell sessions (PSSessions).
rsnp - Remove-PSSnapin - Removes Windows PowerShell snap-ins from the current session.
rujb - Resume-Job - Restarts a suspended job
rv - Remove-Variable - Deletes a variable and its value.
rvpa - Resolve-Path - Resolves the wildcard characters in a path, and displays the path contents.
rwmi - Remove-WMIObject - Deletes an instance of an existing Windows Management Instrumentation (WMI) class.
sajb - Start-Job - Starts a Windows PowerShell background job.
sal - Set-Alias - Creates or changes an alias (alternate name) for a cmdlet or other command element in the current Windows PowerShell session.
saps - Start-Process - Starts one or more processes on the local computer.
sasv - Start-Service - Starts one or more stopped services.
sbp - Set-PSBreakpoint - Sets a breakpoint on a line, command, or variable.
sc - Set-Content - Replaces the contents of a file with contents that you specify.
select - Select-Object - Selects objects or object properties.
set - Set-Variable - Sets the value of a variable. Creates the variable if one with the requested name does not exist.
shcm - Show-Command - Creates Windows PowerShell commands in a graphical command window.
si - Set-Item - Changes the value of an item to the valu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment