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
import java.io.IOException; | |
import java.net.Inet4Address; | |
import java.net.InetAddress; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.UnknownHostException; | |
import java.util.Arrays; | |
import jpcap.JpcapCaptor; | |
import jpcap.JpcapSender; |
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
[user@www]# alternatives --install /usr/bin/java java /opt/jdk1.6.0_07/bin/java 2 | |
[user@www]# alternatives --config java | |
There are 2 programs which provide 'java'. | |
Selection Command | |
----------------------------------------------- | |
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java | |
2 /opt/jdk1.6.0_07/bin/java | |
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
#!/bin/sh | |
# this script was initially written for Redhat/CentOS | |
# file is /etc/cron.daily/diskAlert.cron | |
# requires enabling outgoing sendmail from localhost to a valid | |
# smtp server, which is usually disabled by default | |
ADMIN="jausten@adomain.com,another@adomain.com" | |
THRESHOLD=90 | |
df -PkH | grep -vE '^Filesystem|tmpfs|cdrom|media' | awk '{ print $5 " " $6 }' | while read output; | |
do |
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
ACP notes: https://gist.github.com/djangofan/a8b3e82e585525467c454515a8fb9ecf | |
Practice Tests $9.99: http://enthuware.com/index.php/ocpjp-8-average-scores | |
Guided Practice $140: http://www.ucertify.com/exams/Oracle/1Z0-809.html | |
Transcender: https://www.transcender.com/premium-solution/oracle/1z0-809.kap | |
Remember: javac -Xprint package.classname | |
https://ocpjava.wordpress.com/presentations/ | |
http://www.java2s.com/Tutorials/Java/java.util.stream/Collectors/ !! STUDY THIS!!! | |
https://github.com/eugenp/tutorials/tree/master/core-java | |
https://www.slideshare.net/ibrahimkurce/oca-java-se-8-exam-chapter-6-exceptions | |
https://docs.oracle.com/javase/8/docs/api/java/util/function/class-use/BiPredicate.html |
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
#!/bin/bash | |
#brew install socat | |
# socat TCP-LISTEN:2377,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock | |
#file: docker.socat_listener | |
# <?xml version="1.0" encoding="UTF-8"?> | |
# <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
# <plist version="1.0"> | |
# <dict> |
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
// This is the official Selenium documention endorsed method of waiting for elements. | |
// This method is ineffective because it still suffers from | |
// the stale element exception. | |
public static void clickByLocator ( final By locator ) { | |
WebElement myDynamicElement = ( new WebDriverWait(driver, 10)) | |
.until( ExpectedConditions.presenceOfElementLocated( locator ) ); | |
myDynamicElement.click(); | |
} |
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 test.ra; | |
import static com.jayway.restassured.RestAssured.*; | |
import static com.jayway.restassured.path.xml.XmlPath.*; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class SOAPDictionary { |
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
Angular CLI version | Angular version | Node.js version | TypeScript version | RxJS version | |
---|---|---|---|---|---|
1.0.0-beta.17 (package name: angular-cli) | ~2.0.2 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
1.0.0-beta.20-1 (package name: angular-cli) | ~2.1.2 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
1.0.0-beta.22-1 (package name: angular-cli) | ~2.2.4 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
1.0.0-beta.30 | ~2.3.1 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
1.0.0-rc.4 | ~2.4.10 | ^6.9.5 | ~2.0.10 | ^5.0.3 | |
~1.0.6 | >= 4.0.3 <= 4.1.3 | ^6.9.5 | ~2.2.2 | ^5.0.3 | |
~1.1.3 | >= 4.0.3 <= 4.1.3 | ^6.9.5 | ~2.3.4 | ^5.0.3 | |
~1.2.7 | >= 4.0.3 <= 4.1.3 | ^6.9.5 | ~2.3.4 | ^5.0.3 | |
~1.3.2 | >= 4.2.6 <= 4.4.7 | ^6.9.5 | ~2.4.2 | ^5.0.3 |
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
@DataProvider(name = "DPMethodAlias") // Get A Form | |
public static Object[][] getFromFile() { | |
System.out.println("Loading data provider DPMethodAlias..."); | |
// lastRun is a timestamp value used to find the .tests file | |
File tFile = new File( "test-output/work/" + WSUtils.getTestProperty("lastRun", "testng.config") + ".tests"); | |
FileReader fileReader = null; | |
List<String> lines = new ArrayList<String>(); | |
try { | |
String line = null; | |
fileReader = new FileReader( tFile ); |
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
These instructions require that you have Docker properly setup on your Windows computer: | |
docker volume create portainer_data | |
docker run -d -p 3040:9000 --name portainer --restart=always -v portainer_data:/data portainer/portainer --no-auth -H tcp://host.docker.internal:2375 | |
docker volume create --name=bitcoind-data | |
docker run -v bitcoind-data:/bitcoin --name=bitcoind-node -d -p 18444:18444 -p 127.0.0.1:18332:18332 bitcoindevelopernetwork/bitcoind-regtest | |
then, open Portainer on localhost:3040 | |
then, open the console to write commmands |
NewerOlder