Skip to content

Instantly share code, notes, and snippets.

View namila007's full-sized avatar
😾
Focusing

Namila Bandara namila007

😾
Focusing
View GitHub Profile
@namila007
namila007 / removenonalphanum.c
Created April 19, 2017 11:46
Removing Non alpha numeric characters (C programming)
char* stringRemoveNonAlphaNum(char *str)
{
int i = 0, j = 0;
int arraysize=strlen(str)+1;
char c;
char *temp=malloc(arraysize* sizeof(char)); //allocatin memory for new string
for(i=0;i<arraysize;i++){
c=str[i];
if(isalnum(c)!= 0){ //if it is not a alpha num put in a new string temp
@namila007
namila007 / gist:52ed43fbf0236c3b304034f1e0a85d73
Created November 30, 2017 05:39 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@namila007
namila007 / Setup.md
Last active February 2, 2018 18:03
Setting Up IntelliJ for Java Web and Tomcat Server

JavaEE-Web-App-Test

Trying JavaEE Web App with servelets

---How to Run---


Basic Setup for IntelliJ Idea

1 Go to edit Configurations

screenshot_1

@namila007
namila007 / pom.xml
Created February 21, 2018 20:22
POM file for maven java web app deployed to tomcat server
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.lab3</groupId>
<artifactId>SessionLab</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>SessionLab Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
@namila007
namila007 / steps.md
Last active May 2, 2018 14:28
Deploying Maven Java Web App to an Apache Tomcat server

Deploying Maven Java Web App to Apache Tomcat server

This is about how a simple maven java web app deploy to tomcat server

---How to do---


@namila007
namila007 / .env.travis
Created February 24, 2018 18:25 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@namila007
namila007 / .travis.yml
Last active April 29, 2018 15:57
Configuration of .travis.yml for maven github release
language: java
#caching directory
cache:
directories:
- /home/travis/build/YOUR_USERNAME/REPO_NAME/target/
- $HOME/.m2
jdk: oraclejdk8
@namila007
namila007 / gist:5cf0a739d7bd4ed7c2eb7755fef5d528
Created May 14, 2018 19:20 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@namila007
namila007 / package.json
Created July 18, 2018 21:21
Running Nodemon and ESLint configuration
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "nodemon src/app.js --exec \"npm run lint && node\"",
"lint": "eslint **/*.js"
},
@namila007
namila007 / heroku.cmd
Created July 24, 2018 19:55
Heroku.cmd file option to work on WINDOWS 10 BASH
@echo off
setlocal enableextensions
if not "%HEROKU_REDIRECTED%"=="1" if exist "%LOCALAPPDATA%\heroku\client\bin\heroku.cmd" (
set HEROKU_REDIRECTED=1
"%LOCALAPPDATA%\heroku\client\bin\heroku.cmd" %*
goto:EOF
)
if not defined HEROKU_BINPATH set HEROKU_BINPATH="%~dp0heroku.cmd"