Step 1:
openssl req -x509 -sha256 -nodes -days 7300 -newkey rsa:2048 -keyout Sample.key -out Sample.pem
Step 2:
openssl pkcs12 -export -out Sample.p12 -inkey Sample.key -in Sample.pem
Step 3:
Step 1:
openssl req -x509 -sha256 -nodes -days 7300 -newkey rsa:2048 -keyout Sample.key -out Sample.pem
Step 2:
openssl pkcs12 -export -out Sample.p12 -inkey Sample.key -in Sample.pem
Step 3:
import java.util.*; | |
public class Main { | |
private static Stack<Integer> StackMachine = new Stack<>(); | |
private static HashSet<Character> Operators = new HashSet<>(Arrays.asList(new Character[] {'+', '-', '*', '/'})); | |
public static void main(String[] args) { | |
String input = "13+62*7+*"; | |
/*** |
defmodule MyApp.PgDump do | |
use GenServer | |
require Logger | |
@backup_config Application.get_env(:myapp, :db_backup_config) | |
def start_link do | |
GenServer.start_link(__MODULE__, [], name: :pg_dump) | |
end | |
defp schedule_database_backup() do |
defmodule MyApp.Elasticsearch do | |
use HTTPoison.Base | |
@es_config Application.get_env(:myapp, :elasticsearch) | |
def process_url(url) do | |
"#{@es_config[:url]}/#{@es_config[:type]}#{url}" | |
end | |
defp process_request_headers(headers) when is_map(headers) do |
#Use Case When we need to get only near geo points, no way to filter or get some small amount of geo points in query. Imagine when you have 500 geo points in single document, how would you identify or limit near or far locations?
See https://discuss.elastic.co/t/retrieving-only-matching-locations/54590 and http://stackoverflow.com/questions/37919891/how-to-limit-returning-nested-objects-in-elasticsearch ##Create Index
curl -XPUT localhost:9200/geo
public static OkHttpClient getTLSClient(){ | |
OkHttpClient myOkHttpClient = new OkHttpClient(); | |
if(TLS_1_2){ | |
//tls 1.2 | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ | |
ConnectionSpec spec = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) | |
.tlsVersions(TlsVersion.TLS_1_2) | |
.build(); | |
myOkHttpClient.setConnectionSpecs(Collections.singletonList(spec)); |
> WinSCP.com /script=%system.teamcity.build.workingDir%\deploy.dev /log=%system.teamcity.build.workingDir%\deploy.dev.log /parameter "private_key.ppk" "%system.teamcity.build.workingDir%" "/var/www/dev" "hostkey fingerprint" |
<!-- | |
Allow these formats | |
- m/YY | |
- mm/YY | |
- m/YYYY | |
- mm/YYYY | |
- month 1-12 | |
- year > 14 && year < 2099 | |
http://jsfiddle.net/GhxKx/4/ |
CREATE TABLE #Organization(Id INT, ParentID INT, Name nvarchar(20)); | |
INSERT INTO #Organization VALUES(1,NULL,'A'); | |
INSERT INTO #Organization VALUES(2,NULL,'B'); | |
INSERT INTO #Organization VALUES(3,NULL,'C'); | |
INSERT INTO #Organization VALUES(4,1,'A->D'); | |
INSERT INTO #Organization VALUES(5,2,'B->E'); | |
INSERT INTO #Organization VALUES(6,3,'C->F'); |