Skip to content

Instantly share code, notes, and snippets.

View samuel-pt's full-sized avatar

Samuel Alexander samuel-pt

  • Palmtree Infotech
  • Chennai
View GitHub Profile
@TsuyoshiUshio
TsuyoshiUshio / terraform.tf
Created April 30, 2016 04:24
Terraform configurations for Azure ARM template
variable "default_user" {}
variable "default_password" {}
variable "subscription_id" {}
variable "client_id" {}
variable "client_secret" {}
variable "tenant_id" {}
provider "azurerm" {
subscription_id = "${var.subscription_id}"
client_id = "${var.client_id}"
@thomasdarimont
thomasdarimont / App.java
Last active July 10, 2023 12:19
How to use custom SpEL functions in @value with Spring Boot
package demo;
import static java.lang.reflect.Modifier.*;
import java.util.Arrays;
import java.util.Set;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.BeanExpressionResolver;
@josegonzalez
josegonzalez / access.lua
Created December 3, 2012 18:26
Simple lua file enabling oauth support for nginx via nginx-lua and access_by_lua.
- certain endpoints are always blocked
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then
ngx.exit(403)
end
-- import requirements
local cjson = require "cjson"
-- setup some app-level vars
local app_id = "APP_ID"