A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
# | |
# Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license. | |
# | |
import ctypes | |
import logging | |
import os | |
class ColorizingStreamHandler(logging.StreamHandler): | |
# color names to indices | |
color_map = { |
import os | |
import sys | |
import traceback | |
from functools import wraps | |
from multiprocessing import Process, Queue | |
def processify(func): | |
'''Decorator to run a function as a process. | |
Be sure that every argument and the return value |
#!/usr/bin/env python | |
""" | |
@author Sunil Mallya | |
Sample code to show a parent - child like process communication model where parent listens on a port and passes the pickled file descriptor | |
to the child process to read the bytes off the socket. The communication in this snippet is via a Queue which is thread/process safe | |
Just to be clear, the parent process is still accepting the connection and we are sending a live fd to the child | |
""" | |
import os | |
import sys |
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- | |
Documented at | |
http://linux.die.net/man/5/fonts-conf | |
To check font mapping run the command at terminal | |
$ fc-match 'helvetica Neue' |
# depends on liblas built with laszip and ogr support | |
mkdir -p laz | |
cd laz | |
# download from noaa | |
if [ ! -f 20040805A_ak302_2_000037_p13.laz ]; then | |
wget http://www.csc.noaa.gov/htdata/lidar1_z/geoid12a/data/23/20040805A_ak302_2_000037_p13.laz | |
wget http://www.csc.noaa.gov/htdata/lidar1_z/geoid12a/data/23/20040805A_ak302_2_000038_p13.laz | |
wget http://www.csc.noaa.gov/htdata/lidar1_z/geoid12a/data/23/20040805A_ak302_2_000039_p13.laz | |
wget http://www.csc.noaa.gov/htdata/lidar1_z/geoid12a/data/23/20040805A_ak302_2_000040_p13.laz |
# Written by Brendan O'Connor, [email protected], www.anyall.org | |
# * Originally written Aug. 2005 | |
# * Posted to gist.github.com/16173 on Oct. 2008 | |
# Copyright (c) 2003-2006 Open Source Applications Foundation | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
# -*- coding: utf-8 -*- | |
""" | |
hash_ring | |
~~~~~~~~~~~~~~ | |
Implements consistent hashing that can be used when | |
the number of server nodes can increase or decrease (like in memcached). | |
Consistent hashing is a scheme that provides a hash table functionality | |
in a way that the adding or removing of one slot | |
does not significantly change the mapping of keys to slots. |
# Input: | |
# {% verbatim tag:p %} | |
# $$a_1, a_2, a_3, \ldots$$ | |
# {% endverbatim %} | |
# | |
# Output: | |
# <p>$$a_1, a_2, a_3, \ldots$$</p> | |
# | |
# Author: Hiroshi Yuki. | |
# Description: The content between {% verbatim %} and {% endverbatim %} would be rendered 'as is'. |
#Install Vagrant Bleeding Edge on Win 10#
###Install Chocolatey###
From elevated command prompt:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
###Install Github for Windows###