This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ipcMain.on('printPdf', (event, pdf) => { | |
printWindow = new BrowserWindow({width: 800, height: 600}) | |
printWindow.loadURL("data:text/html," + pdf) | |
printWindow.webContents.on("did-finish-load", function() { | |
// Use default printing options | |
printWindow.webContents.printToPDF({}, function(error, data) { | |
if (error) throw error | |
fs.writeFile(app.getPath('desktop') + '/test.pdf', data, function(err) { | |
if (err) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.keys(emptyObject).forEach((key) => { | |
this.$set(this.newData, key, emptyObject[key]) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query IntrospectionQuery { | |
__schema { | |
queryType { | |
name | |
} | |
mutationType { | |
name | |
} | |
subscriptionType { | |
name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fb = new DSFirebaseAdapter({ | |
basePath: 'https://my-app.firebase.io' | |
}); | |
var ls = new DSLocalStorageAdapter(); | |
var store = new JSData.DS({ | |
// try firebase first, otherwise try offline data | |
fallbackAdapters: ['fb', 'ls'], | |
// After creating an item, sync it to localStorage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Daniel Kesberg <[email protected]> | |
* @copyright (c) 2013, Daniel Kesberg | |
*/ | |
error_reporting(E_ALL); | |
ini_set('display_errors', false); | |
$parseTimeStart = microtime(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* File: SimpleImage.php | |
* Author: Simon Jarvis | |
* Modified by: Miguel Fermín | |
* Based in: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* source: http://stackoverflow.com/questions/3203354/php-script-to-render-a-single-transparent-pixel-png-or-gif | |
*/ | |
// transparent 1x1 png | |
header('Content-Type: image/png'); | |
echo base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII='); | |
// transparent 1x1 gif | |
header('Content-Type: image/gif'); |
NewerOlder