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
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.)
@zonayedpca
zonayedpca / nodejs-cheatsheet.js
Created February 6, 2018 01:40 — forked from LeCoupa/nodejs-cheatsheet.js
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@zonayedpca
zonayedpca / restful_routes.md
Created February 6, 2018 01:40 — forked from alexpchin/restful_routes.md
7 Restful Routes
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
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 March 12, 2018 02:37
Make a Basic Electron Cross Platform Desktop App
const {app} = require('electron'),
{BrowserWindow} = require('electron');
@zonayedpca
zonayedpca / app.js
Last active March 12, 2018 03:53
Make a Basic Electron Cross Platform Desktop App
app.on('ready', () => {
//Create a new Browser Window
//Load the content
});
@zonayedpca
zonayedpca / app.js
Last active March 12, 2018 02:47
Make a Basic Electron Cross Platform Desktop App
//Create a new Browser Window
const mainWindow = new BrowserWindow({
width: 800,
height: 600
});
@zonayedpca
zonayedpca / app.js
Created March 12, 2018 02:55
Make a Basic Electron Cross Platform Desktop App
//Load the content
mainWindow.loadURL('https://with.zonayed.me');
@zonayedpca
zonayedpca / app.js
Created March 12, 2018 03:01
Make a Basic Electron Cross Platform Desktop App
//Load the content
mainWindow.loadURL(`file://${__dirname}/public/index.html`);
@zonayedpca
zonayedpca / index.html
Last active March 12, 2018 04:00
Make a Basic Electron Cross Platform Desktop App
<!DOCTYPE html>
<html>
<head>
<title>A Demp Electron App</title>
</head>
<body>
<p>It is working!</p>
</body>
</html>