$ clang++ main.cpp -std=c++11 -o main && ./main Converting red to string: red Converting 2 to enum to string: yellow Converting 20 to enum to string: undefined Converting 20 to enum to int: 20
|const mode = process.argv;|
|const startDate = process.argv;|
|const endDate = process.argv;|
|const vacationDays = parseInt(process.argv, 10);|
|const sugar = require('sugar-date');|
|const moment = require('moment');|
|const parsedStartDate = moment(sugar.Date.create(startDate));|
Add this line to a Dockerfile to install and configure DogStatsD
in the container. Requires that
apt-get is available on the system.
This script will install
curl in your environment but not
remove it; you should uninstall it if you don't want it available
in the container.
These script uses
md5sum to validate all external scripts that are
|-- can be used in ghci|
|import qualified Data.ByteString as B|
|import Numeric (showHex)|
|import qualified Data.ByteString.Lazy as LBS|
|import qualified Data.Binary as B|
|-- encode some object to a binary ByteString|
|let s = (B.encode someObjectThatHasBinaryInstance)|
|let prettyPrint = P.concatMap ((\x -> "0x"++x++" ") . flip showHex "") . B.unpack :: B.ByteString -> String|
Python "image not found" error resolution
This is an error that seems to occur on OS X El Capitan. You may see errors like this that did not occur before:
$ ./my_python_script.py Traceback (most recent call last): File "./my_python_script.py", line 17, in <module> import psycopg2 File "/Users/joshuagross/miniconda2/envs/my_env/lib/python2.7/site-packages/psycopg2/__init__.py", line 50, in <module>
|# Copyright (c) 2016, Swift Navigation, All Rights Reserved.|
|# Released under MIT License.|
|# Find documentation of parameters here:|
|# time_t is a `time_struct` (https://docs.python.org/2/library/time.html)|
|# alt_m, geoidal_sep_m are in meters|
|from math import floor|
A list of interesting URLs
... and a short description of interesting things learned within:
- 2015-12-25: Beautiful Decay of AOL: someone going over old AOL CDs and "reviewing" the contents of AOL pages.
- 2015-12-25: Specialising Dynamic Techniques for Implementing The Ruby Programming Language: Chris Seaton's PhD thesis - embracing metaprogramming in Ruby to optimize Ruby VMs.
- 2015-12-25: People around the world are eating banana peels because they know something that Westerners do not: basically eating banana peels is better for you and the environment.
- 2015-12-26: Amateur Hour: a guide to how training for beating amateur cycling records works. tl;dr: excruciating, requires intense focus. Train things at 90% of maximum for shorter intervals.
- 2015-12-26: [Attritional Interfaces](https://samgentle.com