Skip to content

Instantly share code, notes, and snippets.

:octocat:
Coffee, Coke, Code

Zonayed Ahmed zonayedpca

:octocat:
Coffee, Coke, Code
Block or report user

Report or block zonayedpca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View SmoothScroll.js
IMPORTANT
Please duplicate this radar for a Safari fix!
This will clean up a 50-line workaround.
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072)
//////////////////////////////////////////////////////////////////////////////
(Now available as a standalone repo.)
View nodejs-cheatsheet.js
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
View restful_routes.md
URL HTTP Verb Action
/photos/ GET index
/photos/new GET new
/photos POST create
/photos/:id GET show
/photos/:id/edit GET edit
/photos/:id PATCH/PUT update
/photos/:id DELETE destroy
View gist:eb1710adbf8d4baa6f8047a80a585a02
const express = require('express'),
app = express();
app.set('view engine', 'ejs');
app.get('/', (req, res) => res.render('index'));
app.listen('3001', () => console.log('Server is running...'));
@zonayedpca
zonayedpca / app.js
Last active Mar 12, 2018
Make a Basic Electron Cross Platform Desktop App
View app.js
const {app} = require('electron'),
{BrowserWindow} = require('electron');
@zonayedpca
zonayedpca / app.js
Last active Mar 12, 2018
Make a Basic Electron Cross Platform Desktop App
View app.js
app.on('ready', () => {
//Create a new Browser Window
//Load the content
});
@zonayedpca
zonayedpca / app.js
Last active Mar 12, 2018
Make a Basic Electron Cross Platform Desktop App
View app.js
//Create a new Browser Window
const mainWindow = new BrowserWindow({
width: 800,
height: 600
});
@zonayedpca
zonayedpca / app.js
Created Mar 12, 2018
Make a Basic Electron Cross Platform Desktop App
View app.js
//Load the content
mainWindow.loadURL('https://with.zonayed.me');
@zonayedpca
zonayedpca / app.js
Created Mar 12, 2018
Make a Basic Electron Cross Platform Desktop App
View app.js
//Load the content
mainWindow.loadURL(`file://${__dirname}/public/index.html`);
@zonayedpca
zonayedpca / index.html
Last active Mar 12, 2018
Make a Basic Electron Cross Platform Desktop App
View index.html
<!DOCTYPE html>
<html>
<head>
<title>A Demp Electron App</title>
</head>
<body>
<p>It is working!</p>
</body>
</html>
You can’t perform that action at this time.