Skip to content

Instantly share code, notes, and snippets.

View Niweera's full-sized avatar
🚁
________Apache_Helicopter_______

Nipuna Weerasekara Niweera

🚁
________Apache_Helicopter_______
View GitHub Profile
@Niweera
Niweera / WebServer.py
Last active May 25, 2019 19:16 — forked from joncardasis/WebServer.py
A simple and quick HTTP web server in Python
"""
Author: Jonathan Cardasis
"""
import socket
import signal # Allow socket destruction on Ctrl+C
import sys
import time
import threading
@Niweera
Niweera / tvapi.js
Last active May 25, 2019 19:14
How to use the Fetch API to get resources from a different API inside another API. For example how to get TVMaze API resources inside Niweera TVDB API.
const express = require("express");
const router = express.Router();
const fetch = require('node-fetch');
global.Headers = fetch.Headers;
// @route GET /tvapi/tvmaze
// @desc Get all tvmaze details
// @access Public
router.get("/tvmaze", (req, res) => {
fetch('http://api.tvmaze.com/shows')
@Niweera
Niweera / Constructor.java
Last active June 5, 2019 14:28
The following snippets are helpful to create JAVA code.
// Create Java Classes
// One project should have only one Main class.
// Main class declaration
package com.niweera.Project;
public class Main{
public static void main(String[] args){
System.out.println("Hello World!")
}
}
@Niweera
Niweera / Apache_VHosts.txt
Created May 25, 2019 19:48
As seen on Digital Ocean
Prereqs:
sudo apt-get update
sudo apt-get install apache2
Step One — Create the Directory Structure:
sudo mkdir -p /var/www/example.com/public_html
sudo mkdir -p /var/www/test.com/public_html
Step Two — Grant Permissions:
sudo chown -R $USER:$USER /var/www/example.com/public_html
@Niweera
Niweera / Swap_Linux.txt
Created May 25, 2019 19:53
As seen on Digital Ocean
Check the System for Swap Information:
sudo swapon --show
free -h
Check Available Space on the Hard Drive Partition:
df -h
Create a Swap File:
sudo fallocate -l 1G /swapfile
CREATE USER 'user'@'hostname';
GRANT ALL PRIVILEGES ON dbTest.* To 'user'@'hostname' IDENTIFIED BY 'password';
https://drive.google.com/file/d/{add the uuid}
Having patience
Being a problem solver
Passion for what you do
Love of learning
Being a team player
Not being arrogant
Being proud of your work
Good time/task management
Having good focus
Listen to others

Contributing to Front-end Developer Interview Questions

Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.