A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
#include "tweetnacl.h" | |
#define FOR(i,n) for (i = 0;i < n;++i) | |
#define sv static void | |
typedef unsigned char u8; | |
typedef unsigned int u32; | |
typedef unsigned long long u64; | |
typedef long long i64; | |
typedef i64 gf[16]; |
def get_data_from_request(request): | |
""" | |
Convenience function to create data from a webapp2 request object. | |
:param request: | |
:return: dict | |
""" | |
# request.params combines the GET and POST data, this would give us some | |
# extra info to this particular request. | |
params = dict(request.params) |
A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.
The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.
What can you say?
As configured in my dotfiles.
start new:
tmux
start new with session name:
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
''' | |
Hey guys! | |
This is a the first python program(except hello worlds) I have written. | |
With HTTPServer, I can easily write a webserver. | |
Python is such a powerful language that many complicated problems can be | |
solved by a few lines of code. | |
Welcome to visit my blog: www.xiaoxia.org | |
The proxy program is just coded for fun <img src="http://xiaoxia.org/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley"> | |
''' |
#!/bin/bash | |
VENV=$1 | |
if [ -z $VENV ]; then | |
echo "usage: runinenv [virtualenv_path] CMDS" | |
exit 1 | |
fi | |
. ${VENV}/bin/activate | |
shift 1 | |
echo "Executing $@ in ${VENV}" | |
exec "$@" |