Skip to content

Instantly share code, notes, and snippets.

@spc16670
spc16670 / encryption.java
Created September 6, 2018 05:51 — forked from itarato/encryption.java
Java AES CBC encryption example
package com.company;
import javax.crypto.Cipher;
import javax.crypto.Mac;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.MessageDigest;
import java.security.SecureRandom;
public class Main {
@spc16670
spc16670 / common.loading.css
Created November 21, 2017 18:02 — forked from tracend/common.loading.css
CSS3 Loading Overlay
body.loading:after {
/* with no content, nothing is rendered */
content: "";
position: fixed;
/* element stretched to cover during rotation an aspect ratio up to 1/10 */
top: -500%;
left: -500%;
right: -500%;
bottom: -500%;
z-index: 9999;
Download native APR libraties from http://tomcat.apache.org/download-native.cgi
├── ca.crt
├── ca.key
└── tcnative
├── openssl
│   ├── HashInfo.txt
│   ├── libeay32.dll
│   ├── OpenSSL License.txt
@spc16670
spc16670 / multi_module_mvn_webapp.py
Last active February 21, 2024 11:59
a naïve script to create Multi-Module Maven Web Application skeleton
#!/usr/bin/env python
#
# http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html
#
import os
import sys
import shutil
import xml.dom.minidom
import subprocess
@spc16670
spc16670 / UK POSTCODE PATTERN
Last active February 21, 2024 11:36
UK Postcode Regex pattern
(GIR 0AA)
| (((XX[0-9][0-9]?)
| ([A-Z-[QVX]][0-9][0-9]?)
| (([A-Z-[QVX]][A-Z-[IJZ]][0-9][0-9]?)
| (([A-Z-[QVX]][0-9][A-HJKSTUW])
| ([A-Z-[QVX]][A-Z-[IJZ]][0-9][ABEHMNPRVWXY])))) [0-9][A-Z-[CIKMOV]]{2})