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.BufferedOutputStream; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.EOFException; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; |
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
// | |
// ExampleDelegate.h | |
// Example | |
// | |
// Created by Scott Robertson on 2/10/13. | |
// Copyright (c) 2013 Scott Robertson. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
<? | |
function aes128_cbc_encrypt($key, $data, $iv) { | |
if(16 !== strlen($key)) $key = hash('MD5', $key, true); | |
if(16 !== strlen($iv)) $iv = hash('MD5', $iv, true); | |
$padding = 16 - (strlen($data) % 16); | |
$data .= str_repeat(chr($padding), $padding); | |
return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, $iv); | |
} |
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
/** | |
* Author: Ian Gallagher <igallagher@securityinnovation.com> | |
* | |
* This code utilizes jBCrypt, which you need installed to use. | |
* jBCrypt: http://www.mindrot.org/projects/jBCrypt/ | |
*/ | |
public class Password { | |
// Define the BCrypt workload to use when generating password hashes. 10-31 is a valid value. | |
private static int workload = 12; |
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
@Bean | |
public EmbeddedServletContainerFactory servletContainer() { | |
TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory() { | |
@Override | |
protected void postProcessContext(Context context) { | |
SecurityConstraint securityConstraint = new SecurityConstraint(); | |
securityConstraint.setUserConstraint("CONFIDENTIAL"); | |
SecurityCollection collection = new SecurityCollection(); | |
collection.addPattern("/*"); | |
securityConstraint.addCollection(collection); |
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
# Glassfish container configured for Blog app | |
# | |
# VERSION 0.1 | |
FROM glassfish | |
MAINTAINER Andrii Grytsyk | |
RUN apt-get update | |
RUN curl http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar -o glassfish/lib/mysql-connector-java-5.1.34.jar | |
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
<profiles> | |
<profile> | |
<id>docker</id> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>com.spotify</groupId> | |
<artifactId>docker-maven-plugin</artifactId> | |
<version>0.4.13</version> | |
<executions> |
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 zw.co.poscloud.utilities; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.stereotype.Component; | |
import java.net.URI; | |
/** | |
* @Author : gwokudasam | |
* @Date : 5/8/2017 |
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
DECLARE @Object AS INT; | |
DECLARE @ResponseText AS VARCHAR(8000); | |
DECLARE @Body AS VARCHAR(8000) = | |
'{ | |
"what": 1, | |
"ever": "you", | |
"need": "to send as the body" | |
}' | |
EXEC sp_OACreate 'MSXML2.XMLHTTP', @Object OUT; |
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
mvn install:install-file -Dfile={Path/to/your/ojdbc6.jar} -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar |
OlderNewer