Update slides first pass, add rename script
parent
752d3519b9
commit
613c77f0c9
Binary file not shown.
After Width: | Height: | Size: 249 KiB |
@ -1,8 +1,8 @@
|
||||
# PhantomJS Under the Hood
|
||||
# PhantomJS Deep Dive
|
||||
|
||||
## Buddy Sandidge
|
||||
|
||||
- February 26, 2015
|
||||
- May 7, 2015
|
||||
- buddy.sandidge@gmail.com
|
||||
- [github.com/xbudex/phantom-talk](https://github.com/xbudex/phantom-talk)
|
||||
- `$ docker run -p 8000:8000 buddys/phantom-talk`
|
||||
|
@ -0,0 +1,3 @@
|
||||
# But Buddy…
|
||||
|
||||
On npm there is a "phantom" and "phantomjs" package, what gives?
|
@ -0,0 +1,3 @@
|
||||
# Web Views
|
||||
|
||||
![Spotify screenshot](/static/images/spotify.png "Spotify")
|
@ -0,0 +1,13 @@
|
||||
# Qt for cli
|
||||
|
||||
```cpp
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
cout << "hello world";
|
||||
return app.exec();
|
||||
}
|
||||
```
|
@ -0,0 +1 @@
|
||||
# And breathe
|
@ -0,0 +1,8 @@
|
||||
# What does it give me?
|
||||
|
||||
- phantom Object
|
||||
- Web Page Module
|
||||
- Child Process Module
|
||||
- File System Module
|
||||
- System Module
|
||||
- Web Server Module
|
@ -0,0 +1,11 @@
|
||||
# `phantom` Object
|
||||
|
||||
- exit
|
||||
- onError
|
||||
- version
|
||||
- addCookie
|
||||
- clearCookies
|
||||
- deleteCookie
|
||||
- libraryPath
|
||||
- injectJs
|
||||
- …
|
@ -0,0 +1,17 @@
|
||||
# Child Process Module
|
||||
|
||||
- spawn
|
||||
```javascript
|
||||
var spawn = require('child_process').spawn;
|
||||
var child = spawn('some-command', ['--with', 'flags'])
|
||||
child.stdout.on('data', function (data) {...})
|
||||
child.stderr.on('data', function (data) {...})
|
||||
child.on('exit', function (code) {...})
|
||||
child.kill('SIGKILL')
|
||||
```
|
||||
- execFile
|
||||
```javascript
|
||||
var execFile = require('child_process').execFile;
|
||||
execFile('some-command', ['flags'], null, function (err, stdout, stderr) {
|
||||
})
|
||||
```
|
@ -0,0 +1,10 @@
|
||||
# File System Module
|
||||
|
||||
- read
|
||||
- move
|
||||
- remove
|
||||
- list
|
||||
- makeDirectory/makeTree
|
||||
- isDirectory/isExecutable/isFile/isLink
|
||||
- removeDirectory/removeTree
|
||||
- …
|
@ -0,0 +1,7 @@
|
||||
# System Module
|
||||
|
||||
- args
|
||||
- env
|
||||
- os
|
||||
- pid
|
||||
- platform
|
@ -0,0 +1,5 @@
|
||||
# Web Server Module
|
||||
|
||||
- port
|
||||
- close
|
||||
- listen
|
@ -0,0 +1,11 @@
|
||||
# Web Page Module
|
||||
|
||||
- evaluate
|
||||
- open
|
||||
- render
|
||||
- includeJs
|
||||
- url
|
||||
- title
|
||||
- content
|
||||
- onResourceReceived/onResourceRequested
|
||||
- …
|
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env node
|
||||
var glob = require('glob');
|
||||
var fs = require('fs');
|
||||
|
||||
function pad(num, size) {
|
||||
var str = num.toString();
|
||||
while (str.length < size) {
|
||||
str = '0' + str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
glob(__dirname + '/../data/slide/*.md', function (err, files) {
|
||||
if (err) { return console.log(err); }
|
||||
files.sort();
|
||||
files.forEach(function (file, index) {
|
||||
var newFile = file.replace(/\d\d\d/, pad((index + 1) * 10, 3));
|
||||
fs.rename(file, newFile, function () {
|
||||
console.log(file, '→', newFile);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue