Code

Code

Save password using git (credential save)

git config --global credential.helper store

Scheduled Annotation for JAVA

// second, minute, hour, day, month, weekday
@Scheduled(cron = "*/10 * * * * *")
public void do {}

Short UID using JavaScript

function generateUID() {
    var firstPart = (Math.random() * 46656) | 0;
    var secondPart = (Math.random() * 46656) | 0;
    firstPart = ("000" + firstPart.toString(36)).slice(-3);
    secondPart = ("000" + secondPart.toString(36)).slice(-3);
    return firstPart + secondPart;
}

http://stackoverflow.com/questions/6248666/how-to-generate-short-uid-like-ax4j9z-in-js



Subscribe to: Posts (Atom)