Skip to content

Instantly share code, notes, and snippets.

@restfulhead
restfulhead / openapi-example.yaml
Created February 25, 2020 21:36
openapi-example
openapi: '3.0.0'
info:
title: 'My awesome API'
version: '1.0'
security:
- apiKeyHeader: []
- apiKeyQuery: []
paths:
'/messages':
get:
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:QmczZTuEKoo6Qdpzkyh1oamnboePFWfe2QSzDjyeH1LbZj ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
Verifying my Blockstack ID is secured with the address 1DYSdcFteWrQFarPpX3ABEk4GdSsD8Ko4w https://explorer.blockstack.org/address/1DYSdcFteWrQFarPpX3ABEk4GdSsD8Ko4w
@restfulhead
restfulhead / jva-tls-test.java
Created January 7, 2017 22:07
Test Java TLSv1.2 connection
import java.net.*;
import java.io.*;
class Main {
public static void main(String[] args) throws Exception {
System.setProperty("https.protocols", "TLSv1.2");
System.setProperty("javax.net.debug", "all");
final URL url = new URL("https://your-server-to-test");
@restfulhead
restfulhead / EncodePolyline
Created October 2, 2016 01:33 — forked from mmdumi/EncodePolyline
Encode polyline. Google Maps API v3 algorithm. Objective c.
+ (NSString *)encodeStringWithCoordinates:(NSArray *)coordinates
{
NSMutableString *encodedString = [NSMutableString string];
int val = 0;
int value = 0;
CLLocationCoordinate2D prevCoordinate = CLLocationCoordinate2DMake(0, 0);
for (NSValue *coordinateValue in coordinates) {
CLLocationCoordinate2D coordinate = [coordinateValue MKCoordinateValue];