Skip to content

Instantly share code, notes, and snippets.

@msarhan
msarhan / spring-security-oracle-schema.sql
Last active July 30, 2019 12:14
Oracle schema for Spring Security 3.x
create table users(
username varchar2(50) not null primary key,
password varchar2(50) not null,
enabled number(1) not null
);
create table authorities (
username varchar2(50) not null,
authority varchar2(50) not null,
constraint fk_authorities_users foreign key(username) references users(username)
@msarhan
msarhan / mp3-copy.bat
Created June 12, 2014 17:39
This command will copy MP3 files from local hard disk and write them to USB stick in alphabetical order. This will solve playback order issue when using MP3 player in a car
robocopy /mir C:\path\to\mp3\folder H:\
@msarhan
msarhan / pdf-merge.sh
Created July 17, 2014 10:20
Merge PDF files using Ghostscript
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=all.pdf 1.pdf 2.pdf
@msarhan
msarhan / generate-maven-repo.js
Last active August 29, 2015 14:21
Generate local Maven repository from existing jar files
/**
* @author Mouaffak A. Sarhan.
*
* This Node script will read Jar files inside 'lib' folder and:
* 1) Install jar files to local Maven repository 'repo'
* 2) Generate 'pom.xml' file
*/
function generate(){
var fs = require('fs');