Skip to content

Instantly share code, notes, and snippets.

@theredstapler
theredstapler / electron-mysql.html
Last active April 21, 2017 05:08
Code for electron tutorial
<html>
<head>
<script>window.$ = window.jQuery = require('./jquery-2.1.4.js');</script>
</head>
<body>
<h1>Electron MySQL Example</h1>
<div id="resultDiv"></div>
<script>
var mysql = require('mysql');
var connection = mysql.createConnection({
<script>window.$ = window.jQuery = require('./jquery-2.1.4.js');</script>
<html>
<head>
<script src="jquery-2.1.4.js"></script>
<script src="jspdf.min.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div id="navbar"><span>jsPDF Tutorial - Form Filling</span></div>
<div id="wrapper">
@theredstapler
theredstapler / electron-helloworld.js
Last active July 3, 2018 19:18
Example code of Electron Hello world Tutorial by Red Stapler. View Tutorial at: https://redstapler.co/tutorials/electron-tutorial/
const electron = require('electron');
const app = electron.app;
const path = require('path');
const url = require('url');
const BrowserWindow = electron.BrowserWindow;
var mainWindow;
app.on('ready',function(){
<?php
require_once 'vendor/autoload.php';
use PhpOffice\PhpWord\Shared\Converter;
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$categories = array('A', 'B', 'C', 'D', 'E');
$series1 = array(5, 3, 4, 2, 7);
<?php
require_once 'vendor/autoload.php';
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$section->addImage('red_stapler_sign.png',array('width' => 650, 'height' => 365));
$section->addImage('https://images-na.ssl-images-amazon.com/images/I/61NRsJeymIL._SL1500_.jpg',array('width' => 650));
<html>
<head>
<script src="jquery-2.1.4.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
<style>
#map {
height: 500px;
}
</style>
</head>
<html>
<head>
<script src="jquery-2.1.4.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
<style>
#map {
height: 500px;
}
</style>
</head>
@theredstapler
theredstapler / google-map-intro.html
Last active November 20, 2019 06:28
Source code of Google Map API Embedding Tutorial by Red Stapler. View Tutorial at: https://redstapler.co/tutorials/google-maps-javascript-api-tutorial/
<html>
<head>
<script src="jquery-2.1.4.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
<style>
#map {
height: 500px;
}
</style>
</head>
<html>
<head>
<script src="jquery-2.1.4.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
<style>
#map {
height: 500px;
}
</style>
</head>