Skip to content

Instantly share code, notes, and snippets.

[req]
default_bits = 2048
prompt = no
default_md = sha256
distinguished_name = dn
[dn]
C=US
ST=MN
L=Eagan
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Browser Storage Demos - Web Storage API </title>
<script type = "text/javascript">
//Check for browser support
if (typeof(Storage) !== "undefined") {
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Browser Storage Demos - IndexDB API </title>
<script type = "text/javascript">
//Check for browser support
if (window.indexedDB) {
import java.io.IOException;
import java.util.HashMap;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.api.resource.Resource;
import org.apache.commons.lang3.StringUtils;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.models.annotations.DefaultInjectionStrategy;
import org.apache.sling.models.annotations.Exporter;
import org.apache.sling.models.annotations.injectorspecific.Self;
import org.apache.sling.models.annotations.Via;
import org.apache.sling.models.annotations.via.ResourceSuperType;
image: atlassian/default-image:2
clone:
depth: 'full'
pipelines:
branches:
dev:
- step:
script:
image: atlassian/default-image:2
pipelines:
branches:
dev:
- step:
script:
- git remote add sync https://testuser:testpassword@github.com/test/test.git
- git checkout dev
- git pull

Facebook oEmbed API Reference

Get Page Embed - Client Access Token

curl -i -X GET "https://graph.facebook.com/v10.0/oembed_page?url={Page URL}&access_token={APP ID}|{Client Access Token}"
e.g. curl -i -X GET "https://graph.facebook.com/v10.0/oembed_page?url=https%3A%2F%2Fwww.facebook.com%2Ftechlogyforum&access_token=191545172686279|c98f87ecec83d6183004602be86410d7"

Git log command

git log (Lists the commits made in the repository)

git log --reverse (Display the output in reverse)

git log --stat (Show statistics for files modified in each commit)
git log --shortstat (Output only the last line of the --stat format containing total number of modified files, as well as number of added and deleted lines.)

git log --relative-date (Display the date in a relative format e.g. “2 weeks ago”)

Agent Configuration for remote JVM(Server)

VM Prarameter - -javaagent:/usr/local/tomcat/lib/jacocoagent.jar=port=6300,address=0.0.0.0,destfile=/tmp/jacoco-remote.exec,includes=com.sample.*,append=true,output=tcpserver

MVN Plugin Configuration

<plugin>
  <groupId>org.jacoco</groupId>
  jacoco-maven-plugin