Skip to content

Instantly share code, notes, and snippets.

View tungphan-agilityio's full-sized avatar
🎯
Focusing

Tung Phan tungphan-agilityio

🎯
Focusing
  • AgilityIO - Software Innovation Redefined
  • Da Nang
View GitHub Profile
General
1. Site uses a cache buster for expiring .js, .css, and images
2. JavaScript and CSS is minified and concatenated into logical groupings
3. Images have been optimized by ImageOptim (http://imageoptim.com/)
Markup
1. Code does not contain inline JavaScript event listeners
@tungphan-agilityio
tungphan-agilityio / SpringAdLdapTest.java
Created April 21, 2017 04:53 — forked from mpilone/SpringAdLdapTest.java
A simple example of using Spring LDAP to authenticate a user against Active Directory.
// Setup the LDAP client (normally done via Spring context file).
LdapContextSource contextSource = new LdapContextSource();
contextSource.setUrl("ldap://adserver.mycompany.com:3268");
contextSource.setBase("DC=AD,DC=MYCOMPANY,DC=COM");
contextSource.setUserDn("readonlyuser@ad.mycompany.com");
contextSource.setPassword("password1");
contextSource.afterPropertiesSet();
LdapTemplate ldapTemplate = new LdapTemplate(contextSource);
ldapTemplate.afterPropertiesSet();
@tungphan-agilityio
tungphan-agilityio / README-Template.md
Created April 4, 2017 10:49 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tungphan-agilityio
tungphan-agilityio / tmux.md
Created December 26, 2016 09:26 — forked from Bekbolatov/tmux.md
Clean tmux cheat-sheet

Clean tmux cheat-sheet

By resources

sessions

list-sessions        ls         -- List sessions managed by server
new-session          new        -- Create a new session
@tungphan-agilityio
tungphan-agilityio / remove-docker-containers.md
Created October 13, 2016 09:41 — forked from ngpestelos/remove-docker-containers.md
How to remove unused Docker containers and images
  1. Delete all containers

     $ docker ps -q -a | xargs docker rm
    

-q prints only the container IDs -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

  1. Delete all untagged images