Skip to content

Instantly share code, notes, and snippets.

View zonayedpca's full-sized avatar
:octocat:
Coffee, Coke, Code

Zonayed Ahmed zonayedpca

:octocat:
Coffee, Coke, Code
View GitHub Profile
@zonayedpca
zonayedpca / app.js
Last active March 12, 2018 04:03
Make a Basic Electron Cross Platform Desktop App
const {app} = require('electron'),
{BrowserWindow} = require('electron');
app.on('ready', () => {
//Your main code will be here
const mainWindow = new BrowserWindow({
width: 800,
height: 600
});
//Load the content
@zonayedpca
zonayedpca / app-es5.js
Created March 12, 2018 13:19
Basic Electron App (ES5 Version)
var app = require('electron').app,
BrowserWindow = require('electron').BrowserWindow;
app.on('ready', function() {
//Your main code will be here
var mainWindow = new BrowserWindow({
width: 800,
height: 600
});
//Load the content
@zonayedpca
zonayedpca / index.html
Created March 14, 2018 02:59
JavaScript Basic
<!DOCTYPE html>
<html>
<head>
<title>Basic JavaScript</title>
</head>
<body>
<h1>Basic JavaScript with Zonayed Ahmed</h1>
<p>This course is made to teach the basics of JavaScript</p>
<script src="script.js"></script>
<!-- saved from url=(0096)file:///C:/Users/Zonayed%20Ahmed/AppData/Roaming/Skype/My%20Skype%20Received%20Files/index2.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Product Select</title>
<link rel="stylesheet" href="./Product Select_files/bootstrap.min.css">
<!-- jQuery library -->
<script src="./Product Select_files/jquery.min.js.download"></script>
<!-- Latest compiled JavaScript -->
<script src="./Product Select_files/bootstrap.min.js.download"></script>
</head>
<html>
<head>
<title>Product Select</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
@zonayedpca
zonayedpca / fclassf1.js
Created March 24, 2018 03:37
First Class Functions
function callMyName(name, callback) {
var myAge = 20;
callback(myAge);
console.log('Is it interesting? Yes it is Mr.' + name);
}
function hello(age) {
console.log('I am passed through argument and my age is: ' + age);
}
@zonayedpca
zonayedpca / fclassf2.js
Created March 24, 2018 03:41
First Class Functions
function welcomeMsg(name) {
console.log('Welcome Mr. ' + name);
return function options(menu) {
console.log('Do you like ' + menu + ' Mr. ' + name);
}
}
welcomeMsg('Zonayed Ahmed')('Coffee');
@zonayedpca
zonayedpca / fclassf3.js
Created March 24, 2018 03:44
First Class Functions
var aFunc = function(name) {
console.log('I am Simply a function and my name is ' + name);
}
var anothervar = aFunc;
anothervar('Zonayed Ahmed');
@zonayedpca
zonayedpca / forloop.js
Created March 24, 2018 15:20
For Loop
for(var i = 0; i < 10; i++) {
console.log('Go ' + i + ' step');
}
@zonayedpca
zonayedpca / whileloop.js
Created March 24, 2018 15:45
While Loop
var num = 0;
while(num < 10) {
num = prompt('Enter the number: ');
}
console.log('Out of the loop');