Skip to content

Instantly share code, notes, and snippets.

View apuravchauhan's full-sized avatar

Apurav Chauhan apuravchauhan

View GitHub Profile
@apuravchauhan
apuravchauhan / gist:3dac13687b039e82e72b09680fad0cfb
Created November 11, 2017 10:07
home.html code for Air pollution app tutorial
<ion-header>
<ion-navbar>
<ion-buttons start>
<button menuToggle ion-button icon-only style="color:white">
<ion-icon name="ios-menu"></ion-icon>
</button>
</ion-buttons>
<ion-title>AIR POLLUTION</ion-title>
<ion-buttons end>
<button ion-button icon-only style="color:white" (click)="reload()">
@apuravchauhan
apuravchauhan / gist:70869d5baa68424c015d4dbbcfd20d50
Created November 11, 2017 10:09
home.scss for Air pollution app tutorial
page-home {
text-align: center;
.scroll-content {
margin-top: 0 !important;
}
.has-refresher > .scroll-content {
border-top: 0;
}
@apuravchauhan
apuravchauhan / gist:fb66f3a559c33b512ea0031d4ae2c9f3
Created November 11, 2017 10:11
Custom font face for Air Pollution App tutorial
$product-font-path: $font-path !default;
@font-face {
font-family: "Product Sans";
font-style: normal;
font-weight: 300;
src: local("Product Sans"), local("Product-Sans-Regular"), url("#{$product-font-path}/ProductRegular.ttf") format("truetype");
}
@font-face {
font-family: "Product Sans";
@apuravchauhan
apuravchauhan / gist:70232cc65b76e72b0412326c11a9756b
Last active November 12, 2017 06:07
Part 2 - Backend integration with Air pollution app - home.ts
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Http } from '@angular/http';
import 'rxjs/add/operator/toPromise';
import { LoadingController } from 'ionic-angular';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
@apuravchauhan
apuravchauhan / gist:feb36ef06a7ad1724ccf61425c17bbb9
Created November 12, 2017 06:08
Part 2 - Final HTML for our Air Pollution App
<ion-header>
<ion-navbar>
<ion-buttons start>
<button menuToggle ion-button icon-only style="color:white">
<ion-icon name="ios-menu"></ion-icon>
</button>
</ion-buttons>
<ion-title>AIR POLLUTION</ion-title>
<ion-buttons end>
@apuravchauhan
apuravchauhan / HelloController.java
Created November 24, 2017 14:11
Sample URL exposed
package com.apuravchauhan.web.controller;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
/**
*
@apuravchauhan
apuravchauhan / nginx.conf
Created November 24, 2017 14:28
NGINX SSL Configuration Snippet
.
.
.
server {
listen 443 ssl http2;
server_name localhost;
ssl_certificate /etc/ssl/certs/myssl.crt;
ssl_certificate_key /etc/ssl/private/myssl.key;
@apuravchauhan
apuravchauhan / server.xml
Created November 24, 2017 14:59
Tomcat's server.xml with RemoteIpValve settings snippet
.
.
.
.
<Engine defaultHost="localhost" name="Catalina">
<Valve className="org.apache.catalina.valves.RemoteIpValve"
internalProxies="127\.0\.[0-1]\.1"
remoteIpHeader="x-forwarded-for"
Verifying my Blockstack ID is secured with the address 1HuewHgGzkuuLVvWHLNN1hCVEeX9Lekf5u https://explorer.blockstack.org/address/1HuewHgGzkuuLVvWHLNN1hCVEeX9Lekf5u
@apuravchauhan
apuravchauhan / gurbani-quotes.json
Last active December 23, 2017 15:59
gurbani quotes
[
{
"gur": "ਦਯਿ ਵਿਗੋਏ, ਫਿਰਹਿ ਵਿਗੁਤੇ; ਫਿਟਾ, ਵਤੈ ਗਲਾ ॥",
"eng": "Ruined by the Merciful Lord, they wander around in disgrace, and their entire troop is contaminated."
}, {
"gur": "ਜੀਆ ਮਾਰਿ ਜੀਵਾਲੇ ਸੋਈ; ਅਵਰੁ ਨ ਕੋਈ ਰਖੈ ॥",
"eng": "The Lord alone kills and restores to life; no one else can protect anyone from Him."
}, {
"gur": "ਦਾਨਹੁ ਤੈ ਇਸਨਾਨਹੁ ਵੰਜੇ; ਭਸੁ ਪਈ ਸਿਰਿ ਖੁਥੈ ॥",
"eng": "They go without giving alms or any cleansing baths; their shaven heads become covered with dust."