Skip to content

Instantly share code, notes, and snippets.

View pranavskurup's full-sized avatar

Pranav Sukumara Kurup pranavskurup

View GitHub Profile
@pranavskurup
pranavskurup / hetzner-proxmox-docker.sh
Created February 20, 2019 17:14 — forked from rwenz3l/hetzner-proxmox-docker.sh
Hetzner Dedicated with Debian 9 (Stretch) and Proxmox 5 (LXC) + Docker-CE + Portainer [NAT]
#############################################
### Proxmox V & Docker-CE + Portainer #
#############################################
## Rescue System
# Erase other disks
dd if=/dev/zero of=/dev/sda bs=1M count=100
dd if=/dev/zero of=/dev/sdb bs=1M count=100
# You can install debian 9 via the guide:
@pranavskurup
pranavskurup / README.md
Created February 4, 2019 13:06 — forked from superseb/README.md
Deploy kubernetes-dashboard on Rancher 2.0 cluster exposed using NodePort

Deploy kubernetes-dashboard on Rancher 2.0 cluster exposed using NodePort

Requirements

Step 1: Generate kubeconfig from the UI

Generate the kubeconfig file for your cluster using the Kubeconfig File button in the Cluster view of your cluster. Save the generated file as $HOME/.kube/config and run kubectl get nodes to verify it works.

package testjava;
import java.util.HashMap;
import java.util.Random;
/*
* URL Shortener
*/
public class URLShortener {
// storage for generated keys
@pranavskurup
pranavskurup / typescript_angular.adoc
Created December 18, 2015 11:53 — forked from esfand/typescript_angular.adoc
AngularJS with TypeScript
@pranavskurup
pranavskurup / ClientContainerCtrl.ts
Created December 18, 2015 11:52 — forked from adhamankar/ClientContainerCtrl.ts
Angular popup service
export class ClientContainerCtrl {
public static $inject = ["$scope", "$http", "$state", "ApiConfig", "popup"];
constructor(public $scope: ng-IScope, public $http: ng.IHttpService
, public $state: ng.ui.IStateService, public ApiConfig: IApiConfig, public popup: Common.Services.ModalService
) {
super($scope, $http);
this.init();
}
@pranavskurup
pranavskurup / application.ts
Created December 18, 2015 11:50 — forked from dylanmckendry/application.ts
Authentication Service for Angular
app.config([
Injectors.$stateProvider, Injectors.$locationProvider, Injectors.$urlRouterProvider, Injectors.$httpProvider, Injectors.$provide,
($stateProvider: ng.ui.IStateProvider, $locationProvider: ng.ILocationProvider, $urlRouterProvider: ng.ui.IUrlRouterProvider,
$httpProvider: ng.IHttpProvider, $provider: ng.auto.IProvideService) => {
$httpProvider.interceptors.push(Injectors.authenticationService);
}
package com.willvuong.foodie.controller;
import com.willvuong.foodie.dao.PlaceRepository;
import com.willvuong.foodie.domain.Place;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.apache.commons.lang3.SerializationUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.jwt.JwtHelper;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.common.OAuth2RefreshToken;
import org.springframework.security.oauth2.common.exceptions.InvalidTokenException;