Skip to content

Instantly share code, notes, and snippets.

@esfand
esfand / NginxRedirect.md
Last active March 21, 2024 07:12
Nginx Redirect

Redirect: Temporary and Permanent

Source

What is an HTTP Redirect?

HTTP redirection, or URL redirection, is a technique of pointing one domain or address to another. There are many uses for redirection, and a few different kinds of redirection to consider.

As you create content and administrate servers, you will often find the need to redirect traffic from one place to another. This guide will discuss the different use-cases for these techniques, and how to accomplish them in Apache and Nginx.

@esfand
esfand / nginxrewrite2.md
Last active March 10, 2024 05:56
Nginx Rewrite
@esfand
esfand / 0-UAA-Configuration.md
Last active August 22, 2023 10:44
UAA Security Features and Configuration

UAA Features and Configuration

It is the responsibility of a Resource Server to extract information about the user and client application from the access token and make an access decision based on that information.

This guide will help authors of resource Servers and maintainers of client and user account data to understand the range of information available and the kinds of decisions that can be taken.

@esfand
esfand / nginx1subapp.md
Last active June 3, 2023 01:15
Nginx Location Ruels

Serving multiple webapps from different folders

November 29, 2011 developmentNginx

Few days ago I had to add a wordpress installation within the same environment where a Codeigniter app was already running happily and undisturbed.

It took me a while to figure out how to keep separate folders on the filesystem, and serve the blog from a subfolder of the main domain:

@esfand
esfand / angular-jqlite.adoc
Last active April 19, 2023 01:32
Angular jqLite

Angular jqLite

jQuery and Angular

Angular doesn’t depend on jQuery. In fact, the Angular source contains an embedded lightweight alternative: jqLite. Still, when Angular detects the presence of a jQuery version in your page, it uses that full jQuery implementation in lieu of jqLite. One direct way in which this manifests itself is with Angular’s element abstraction. For example, in a directive you get access to the element that the directive applies to:

@esfand
esfand / lookupstate.adoc
Last active March 3, 2023 19:23
State Lookup SQL Table
@esfand
esfand / lookuptable.adoc
Last active February 14, 2023 10:04
SQL: Creating a lookup table

SQL: Creating a Lookup SQL Table

Creating a Lookup SQL Table


Here is a syntax cheatsheet for asciidoc -→

AsciiDoc Markup Syntax Summary

A summary of the most commonly used markup. For a complete reference see the 'AsciiDoc User Guide'.

Text formatting

@esfand
esfand / nginxfpm.md
Last active January 18, 2023 21:44
Nginx, FPM, and Setup

Base Configuration

Source

Nginx’s default config is much less annoying than PHP-FPM’s — there’s not a single thing we need to change. Because new versions of Nginx may come with new default configurations, you shouldn’t edit the default /etc/nginx/nginx.conf file.

Instead, you can stick all of your custom modifications in the /etc/nginx/conf.d directory, much like we

@esfand
esfand / typescript_angular.adoc
Last active September 30, 2022 12:37
AngularJS with TypeScript