Skip to content

Instantly share code, notes, and snippets.

@omernaci
omernaci / RestTemplateHelper.java
Created October 21, 2019 07:18 — forked from slmanju/RestTemplateHelper.java
Generic RestTemplate wrapper
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.type.CollectionType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
@omernaci
omernaci / AndroidManifest.xml
Created November 10, 2018 20:38 — forked from takeshiyako2/AndroidManifest.xml
Android Volley Sample
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.yako.volleyinstalltest" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="AppController"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
@omernaci
omernaci / Password.java
Created September 5, 2017 07:07 — forked from craSH/Password.java
A simple example Java class to safely generate and verify bcrypt password hashes for use in authentication systems.
/**
* Author: Ian Gallagher <[email protected]>
*
* 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;