Skip to content

Instantly share code, notes, and snippets.

What is REST?

  • Representational State Transfer
  • An architectural style for designing distributed systems
  • Not a standard, but rather a set of constraints
    • Client/Server, Stateless, Uniform Interface, etc.
  • Not tied to HTTP, but associated most commonly with it

Uniform Interface

  • More flexible principals (no hard and fast rules)
    • Identification of resources
<!-- Respect Rollcall -->
<li><a href="http://www.alistapart.com/articles/">A List Apart &#8212; for website builders</a></li>
<li><a href="http://abstrusegoose.com/">Abstruse Goose &#8212; my favorite comic</a></li>
<li><a href="http://al3x.net/">Alex Payne &#8212; technology rambling</a></li>
<li><a href="http://dashes.com/anil/">Anil Dash &#8212; on culture, apple &amp; design</a></li>
<li><a href="http://weblogs.mozillazine.org/asa/">Asa Dotzler &#8212; on mozilla &amp; software</a></li>
<li><a href="http://www.azarask.in/blog/">Aza Raskin &#8211; on design &amp; firefox</a></li>
<li><a href="http://christophzillgens.com/en/">Christoph Zillgens &#8212; interface design</a></li>
<li><a href="http://cssremix.com/">CSS Remix &#8212; gorgeous designs</a></li>
<li><a href="http://css-tricks.com/">CSS Tricks</a></li>

Spring boot property loading order

Spring Boot looks for properties using a specific order:

  1. Command line arguments
  2. Java System properties (System.getProperties())
  3. OS environment variables
  4. JNDI attributes from java:comp/env
  5. A RandomValuePropertySource that only has properties in random.*
  6. Application properties outside of your packaged jar (application.properties including YAML and profile variants)
  7. Application properties packaged inside your jar (application.properties including YAML and profile variants)
@echo off & setlocal & setlocal EnableDelayedExpansion
IF [%1] == [] exit /b
echo ^>^>^> Scanning Started !!
set extentions=*webm *mkv *flv *avi *mov *wmv *mp4 *m4p *m4v *mpg *mpeg *mpeg *3gp
echo.
echo.
echo.
echo Name,Size(In Byte),Parent>%USERPROFILE%\Desktop\total.csv
import java.util.Properties;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Store;
public class MailReader {
private static final String FOLDER = "Inbox";
@peanutpi
peanutpi / algo_learning.md
Created August 15, 2016 16:50
Algorithm Learning

Following are the Algorithms/Concepts that one must know to solve CS puzzles:

  • Lists, Arrays, Stack
  • Trees-
    • Binary,
    • k-ary,
    • AVL,
    • B and B+ tree
    • range trees (variously known as interval trees or segment trees)
    • Additionally, many DP algorithms make use of a prefix sum array.
@peanutpi
peanutpi / planning.md
Created August 15, 2016 16:58
Checklist for Planning

Planning Checklist.

Initialization

  • How to initialize this library or component.
  • How it’s instance is created and used by other classes (client application).
    • Instance is created by spring
    • Instance is needed to be singleton or not.
    • is there any state that we have to maintain.
@peanutpi
peanutpi / good_read.md
Last active August 16, 2016 14:32
Good books to read for a developer
  • Code Complete (2nd edition) by Steve McConnell
  • The Pragmatic Programmer
  • Structure and Interpretation of Computer Programs
  • The C Programming Language by Kernighan and Ritchie
  • Introduction to Algorithms by Cormen, Leiserson, Rivest & Stein
  • Design Patterns by the Gang of Four
  • Refactoring: Improving the Design of Existing Code
  • The Mythical Man Month
  • The Art of Computer Programming by Donald Knuth
  • Compilers: Principles, Techniques and Tools by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman
@peanutpi
peanutpi / server_config.md
Last active August 18, 2016 12:11
server config

Notes

Steps to secure Ubuntu server

1. Get started

passwd