Skip to content

Instantly share code, notes, and snippets.

View singh1114's full-sized avatar

Ranvir Singh singh1114

View GitHub Profile
{% if include.image_src %}
<!-- If javascript is not on. -->
<noscript><img src="{{include.image_src}}" alt="{{include.image_alt}}" title="{{include.image_title}}" /></noscript>
<!-- If javascript is present. -->
<img data-src="{{include.image_src}}" alt="{{include.image_alt}}" title="{{include.image_title}}" class="blur-up lazyload" />
{% endif %}
{% include lazyload.html image_src="https://image.png" image_alt="Alt" image_title="Title" %}
{% include toc.html content=page.content skip_toc=page.skip_toc%}
@singh1114
singh1114 / toc.html
Last active December 25, 2019 17:35
{% if include.skip_toc %}
{% assign content = include.content %}
{% assign h2_open_start = content | split: "<h2" %}
{% assign final_h2_texts = '' | split: '' %}
{% assign final_h2_ids = '' | split: '' %}
{% for h2_possible_open in h2_open_start %}
{% assign first_char = h2_possible_open | slice: 1,2 %}
{% if first_char == "id" %}
{% assign h2_text_start = h2_possible_open | split: ">" %}
...
<section>
<h1>Reveal.js</h1>
<h3>The HTML Presentation Framework</h3>
<p>
<small>Created by <a href="http://hakim.se">Hakim El Hattab</a> and <a href="https://github.com/hakimel/reveal.js/graphs/contributors">contributors</a></small>
</p>
</section>
...
{% include linked_post.html url="how-to-contribute-to-open-source-and-land-a-better-job" %}
<div class="linked_post">
{% for post in site.posts %}
{% assign post_url = post.url | replace: "/", "" %}
{% if post_url == include.url %}
<div class="linked_post_div">
<article class="post">
<h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
<p style="color: #969494; margin: 10px 0px; font-size: 18px;">
{{ post.date | date: "%B %e, %Y" }}
</p>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<div id="share-bar">
<h4>Share this:</h4>
<div class="share-buttons">
<a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ site.baseurl }}{{ page.url }}"
onclick="window.open(this.href, 'pop-up', 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0'); return false;"
title="Share on Facebook" >
<i class="fa fa-facebook-official share-button"> facebook</i>
package io.singh1114.springboottut;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.context.annotation.PropertySource;
@Configuration
@ComponentScan("io.singh1114.springboottut")
@Profile("test")
spring.datasource.url=jdbc:mysql://localhost:3306/springtestguide
spring.datasource.username=root
spring.datasource.password=<password>
spring.jpa.hibernate.ddl-auto=update