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
#!/bin/sh | |
KERNEL="vmlinuz-4.4.0-112-generic" | |
INITRD="initrd.img-4.4.0-112-generic" | |
CMDLINE="earlyprintk=serial console=ttyS0 acpi=off root=/dev/vda1 ro" | |
MEM="-m 1G" | |
SMP="-c 2" | |
NET="-s 2:0,virtio-net" | |
IMG_HDD="-s 4,virtio-blk,hd.raw" |
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
import inspect; | |
stack = "".join("""%s:%s %s\n%s""" %(f.filename, f.lineno, f.function, f.code_context[0]) | |
for f in inspect.stack()[1:10]) | |
logger.debug(stack) |
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
// = Requirements: freetype 2.5, libpng, libicu, libz, libzip2 | |
// = How to compile: | |
// % export CXXFLAGS=`pkg-config --cflags freetype2 libpng` | |
// % export LDFLAGS=`pkg-config --libs freetype2 libpng` | |
// % clang++ -o clfontpng -static $(CXXFLAGS) clfontpng.cc $(LDFLAGS) \ | |
// -licuuc -lz -lbz2 | |
#include <cassert> | |
#include <cctype> | |
#include <iostream> | |
#include <memory> |
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
;; Make M-x grep work with Emacs/Windows when Babun is installed | |
;; Put in your .emacs file. | |
(when (string-equal system-type "window-nt") | |
(progn | |
(setq babun-bin (concat (getenv "HOMEDRIVE") (getenv "HOMEPATH") "\\.babun\\cygwin\\bin") | |
(setenv "PATH" (concat (getenv "PATH") ";" babun-bin)) | |
)) |
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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"route53:ChangeResourceRecordSets", | |
"route53:GetHostedZone", | |
"route53:ListResourceRecordSets" | |
], | |
"Effect": "Allow", | |
"Resource": [ |
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
from PIL import Image, ImageDraw, ImageFont | |
# get an image | |
base = Image.open('Pillow/Tests/images/lena.png').convert('RGBA') | |
# make a blank image for the text | |
txt = Image.new('RGBA', base.size) | |
# get a font | |
fnt = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40) | |
d = ImageDraw.Draw(txt) # drawing context |
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
from tester import * | |
from PIL import Image, FontFile, PcfFontFile | |
from PIL import ImageFont, ImageDraw | |
codecs = dir(Image.core) | |
if "zip_encoder" not in codecs or "zip_decoder" not in codecs: | |
skip("zlib support not available") |
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
sudo apt-get install pypy | |
sudo apt-get install libjpeg8-dev zlib1g-dev libfreetype6-dev | |
git clone https://github.com/wiredfool/Pillow.git | |
virtualenv -p /usr/bin/pypy vpypy | |
source vpypy/bin/activate | |
cd Pillow/ | |
python setup.py install | |
python Tests/test_imagefont.py --installed |
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
(vpy33-dbg)[erics@localhost Pillow]$ python setup.py install | |
setup.py:76: ResourceWarning: unclosed file <_io.BufferedReader name='README.rst'> | |
return open(file, 'rb').read() | |
setup.py:76: ResourceWarning: unclosed file <_io.BufferedReader name='CHANGES.rst'> | |
return open(file, 'rb').read() | |
running install | |
running bdist_egg | |
running egg_info | |
writing top-level names to Pillow.egg-info/top_level.txt | |
writing Pillow.egg-info/PKG-INFO |
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
# sudoers file. | |
# | |
# This file MUST be edited with the 'visudo' command as root. | |
# Failure to use 'visudo' may result in syntax or file permission errors | |
# that prevent sudo from running. | |
# | |
# See the sudoers man page for the details on how to write a sudoers file. | |
# | |
# Host alias specification |
NewerOlder