Underscore example:
_.each([1, 2, 3], function(num) { alert(num); });| """Distance helpers.""" | |
| import math | |
| EARTH_CIRCUMFERENCE = 6378137 # earth circumference in meters | |
| def great_circle_distance(latlong_a, latlong_b): | |
| """ |
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"
| /* | |
| * Your Stylesheet | |
| * | |
| * This stylesheet is loaded when Atom starts up and is reloaded automatically | |
| * when it is changed. | |
| * | |
| * If you are unfamiliar with LESS, you can read more about it here: | |
| * http://www.lesscss.org | |
| */ |
| import psycopg2 as pg | |
| from io import BytesIO | |
| from collections import defaultdict | |
| from contextlib import contextmanager | |
| from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED | |
| READ_COMMIT = ISOLATION_LEVEL_READ_COMMITTED | |
| AUTO_COMMIT = ISOLATION_LEVEL_AUTOCOMMIT |
#The Winds of Change
Here at Everyday Hero we’re a Ruby shop. We love Ruby. Ruby is great. We are however, starting to experiment with introducing other programming languages and technologies for our backend services into our repertoire. One of our new micro-services has been started in Elixir. In this post I’ll discuss our reasons for looking beyond Ruby at another programming language and technology.
Being a Ruby shop, nearly all our applications are written in Ruby - our oldest apps were started way back on Ruby 1.8 and Rails 1.0, and we now have a fleet of apps that keep up with the latest Ruby and Rails versions, as well as smaller services that use other frameworks like Sinatra or Napa. We have a long history (in Ruby terms) with this technology set. ###Why Ruby is Great I still remember the excitement I felt when I discovered Ruby (and Rails) in about 2006, and I’m pretty sure the reason Ruby gained such popularity is because so many developers felt the same thing. Ruby brought the joy back into prog
| DROP TABLE if exists d_date; | |
| CREATE TABLE d_date | |
| ( | |
| date_dim_id INT NOT NULL, | |
| date_actual DATE NOT NULL, | |
| epoch BIGINT NOT NULL, | |
| day_suffix VARCHAR(4) NOT NULL, | |
| day_name VARCHAR(9) NOT NULL, | |
| day_of_week INT NOT NULL, |
| #!/usr/bin/env bash | |
| set -e | |
| function usage() { | |
| set -e | |
| cat <<EOM | |
| ##### ecs-run ##### | |
| Simple script for running tasks on Amazon Elastic Container Service | |
| One of the following is required: | |
| Required arguments: |