Skip to content

Instantly share code, notes, and snippets.

View isu3ru's full-sized avatar

Isuru Ranawaka isu3ru

  • Sri Lanka
  • 14:05 (UTC +05:30)
View GitHub Profile
import java.util.*;
public class Atm {
public static void main(String arg[]) {
int pasward = 1234;
double amount = 5674.25;
Scanner sc = new Scanner(System.in);
System.out.println("\tWelcome To ABC Bank");
#go to the conf folder
cd /etc/apache2/sites-available
#create the new .conf file
sudo vi myapp.com.conf
#Add the following content to your .conf file
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName myapp.com
@isu3ru
isu3ru / media-query.css
Created August 23, 2018 16:03 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@isu3ru
isu3ru / slugify.js
Created May 29, 2017 06:09 — forked from mathewbyrne/slugify.js
Javascript Slugify
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
/**
* Creates a Javascript Object with gender and date of birth
* - extracted from a given valid Sri Lanka N.I.C. Number
* [email protected]
*/
function parseNIC(nic) {
var nicdata = {
gender: '',
dob: ''
};