A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);
module Shopify.Product.Model where | |
type alias Product = | |
{ created_at : String, | |
id : Int, | |
product_type : String, | |
published_at : String, | |
published_scope : String, | |
title : String, | |
updated_at : String, |
gource -1280x720 -s 0.01 --max-file-lag 0.1 --auto-skip-seconds 0.25 --user-image-dir ./avatar --hide progress,filenames,dirnames,mouse --date-format "%Y-%m-%d" --multi-sampling --bloom-multiplier 0.4 --bloom-intensity 0.8 --user-scale 1 --max-user-speed 50 --file-idle-time 0 --key --font-size 25 --title "Cell Commits" --font-colour FF0000 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 8 -bf 0 gource_cell_commits.mp4 |
# And, to activate, you need to tell Rails to load it up: | |
# config/application.rb | |
config.middleware.insert_before 0, Rack::Attack |
We develop locally on MacOS. Due to some issues with cross compilation, we build the crystal binary on docker locally, | |
then zip that up and ship that along with the docker stuff to elasticbeanstalk. |
FROM crystallang/crystal:0.27.2 | |
WORKDIR /opt/src | |
# Install nodejs | |
COPY bin ./bin | |
RUN bin/nodesource_11.x | |
RUN apt-get update && apt-get install -y nodejs | |
# npm install |
AllCops: | |
RunRailsCops: true | |
# Commonly used screens these days easily fit more than 80 characters. | |
Metrics/LineLength: | |
Max: 120 | |
# Too short methods lead to extraction of single-use methods, which can make | |
# the code easier to read (by naming things), but can also clutter the class | |
Metrics/MethodLength: |
FROM crystallang/crystal:0.27.2 as builder | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends build-essential \ | |
apt-transport-https curl ca-certificates gnupg2 apt-utils | |
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \ | |
&& apt-get install -y nodejs | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ |
$ uname -r
Many programming languages, including Ruby, have native boolean (true and false) data types. In Ruby they're called true
and false
. In Python, for example, they're written as True
and False
. But oftentimes we want to use a non-boolean value (integers, strings, arrays, etc.) in a boolean context (if statement, &&, ||, etc.).
This outlines how this works in Ruby, with some basic examples from Python and JavaScript, too. The idea is much more general than any of these specific languages, though. It's really a question of how the people designing a programming language wants booleans and conditionals to work.
If you want to use or share this material, please see the license file, below.