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 / withoutMap.js
Last active March 25, 2018 05:12
Without Map
var items = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var anotherItems = [];
for(var i = 0; i < items.length; i++) {
anotherItems.push(items[i] * 2);
}
console.log(anotherItems);
@zonayedpca
zonayedpca / withMap.js
Last active March 25, 2018 05:13
With Map
var items = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var anotherItems = items.map(function(item) {
return item * 2;
});
console.log(anotherItems);