#Techniques for Anti-Aliasing @font-face on Windows
It all started with an email from a client: Do these fonts look funky to you? The title is prickly.
The font in question was Port Lligat Sans from Google Web Fonts.
# in a terminal | |
# python -m pip install --user opencv-contrib-python numpy scipy matplotlib ipython jupyter pandas sympy nose | |
import cv2 | |
import pandas as pd | |
import numpy as np | |
import imutils | |
from scipy.spatial import distance as dist | |
from imutils import perspective |
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
#Techniques for Anti-Aliasing @font-face on Windows
It all started with an email from a client: Do these fonts look funky to you? The title is prickly.
The font in question was Port Lligat Sans from Google Web Fonts.
#!/bin/sh +ux | |
# We set the sh +ux flags so that we error on undefined variables and error on bad commands | |
help() { | |
echo >&2 "$0 [-f] [-p] [-q] [<priv_key_file>] [<key_type>] [<key_comment>]" | |
echo >&2 | |
echo >&2 "-q / --quiet to silent all output (except -p if passed)" | |
echo >&2 "-p / --pubkey to output public key after generation" | |
echo >&2 "-f / --force to force replacing existing key" | |
echo >&2 |
On low memory devices like the arduino and esp8266 you do not want strings to be stored in RAM. This occurs by default on these systems. Declare a string const char * xyz = "this is a string"
and it will use up RAM.
The solution on these devices is to allow strings to be stored in read only memory, in Arduino this is the PROGMEM macro. Most of my experience is with the ESP8266 which is a 32bit micros controller. This device stores PROGMEM data in flash. The macro PROGMEM on ESP8266 is simply
#define PROGMEM ICACHE_RODATA_ATTR
#!/bin/bash | |
FILES=`git ls-tree --name-only HEAD .` | |
MAXLEN=0 | |
IFS=$(echo -en "\n\b") | |
for f in $FILES; do | |
if [ ${#f} -gt $MAXLEN ]; then | |
MAXLEN=${#f} | |
fi | |
done |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
//***************************************** | |
// NEC (Japanese) Infrared code sending library for the Arduino | |
// Send a standard NEC 4 byte protocol direct to an IR LED on the define pin | |
// Assumes an IR LED connected on I/O pin to ground, or equivalent driver. | |
// Tested on a Freetronics Eleven Uno compatible | |
// Written by David L. Jones www.eevblog.com | |
// Youtube video explaining this code: http://www.youtube.com/watch?v=BUvFGTxZBG8 | |
// License: Creative Commons CC BY | |
//***************************************** |
#include "MFRC522/MFRC522.h" | |
/* | |
Function Core Pin MRFC522 Pin | |
Reset D2 RST | |
SPI SS D1 SDA | |
SPI MOSI A5 MOSI | |
SPI MISO A4 MISO | |
SPI SCK A3 SCK | |
*/ |
; Sample supervisor config file. | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
;[inet_http_server] ; inet (TCP) server disabled by default |