This is a test, I repeat, this is a test.
Now edited.
This is a test, I repeat, this is a test.
Now edited.
import os | |
from PIL import Image, ImageOps | |
def resize_image(path, box, out=None, fit=True, quality=75): | |
""" Downsample an image. | |
@param path: string - path to the original image | |
@param box: tuple(x, y) - the bounding box of the result image | |
@param out: file-like-object - save the image into the output stream |
/** | |
* Sample key binding (emacs users will hate it, but they're probably not using SublimeText2) | |
* | |
*/ | |
[ | |
{ "keys": ["ctrl+w"], "command": "run_macro_file", "args": {"file": "Packages/User/Quick Wrap.sublime-macro"}} | |
] |
$ phantomjs p.js | |
http://www.soshareit.com/mobile?frmnav=yes | |
http://www.soshareit.com/mobile?frmnav=yes | |
http://s7.addthis.com/js/250/addthis_widget.js | |
http://s7.addthis.com/js/250/addthis_widget.js | |
http://www.soshareit.com/css/style.css | |
http://www.soshareit.com/css/style.css | |
https://secure.quantserve.com/quant.js | |
https://secure.quantserve.com/quant.js | |
http://www.soshareit.com/js/slideshow.js |
var casper = require("casper").create(); | |
var start = new Date().getTime(); | |
var links = [ | |
"http://google.com/", | |
"http://yahoo.com/", | |
"http://bing.com/" | |
]; | |
casper.start(); |
Invokation:
$ casperjs --includes=included_script.js test main_test_script.js
Output:
Test file: main_test_script.js
{ | |
"jshint_options": | |
{ | |
"browser": true, | |
"eqeqeq": true, | |
"evil": true, | |
"regexdash": true, | |
"strict": true, | |
"sub": true, | |
"trailing": true |
# apt-get install nodejs | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following extra packages will be installed: | |
libc-ares2 libev4 libssl1.0.0 libv8-3.8.9.20 multiarch-support | |
The following packages will be REMOVED: | |
openssh-client openssh-server | |
The following NEW packages will be installed: | |
libc-ares2 libev4 libssl1.0.0 libv8-3.8.9.20 multiarch-support nodejs |
/** | |
* Finds your daily SublimeText2 package. Yeah, randomly. | |
* | |
* Requires CasperJS: http://casperjs.org/ | |
* | |
* Usage: $ casperjs sublime-day.js | |
*/ | |
var casper = require('casper').create(); | |
var f = require("utils").format; | |
var packages = []; |
class Bar(object): | |
def plop(self): | |
print 'plop' | |
class Foo(object): | |
def __init__(self): | |
self.bar = Bar() | |
def do(self): | |
print 'done' |