Skip to content

Instantly share code, notes, and snippets.

@ahamid
ahamid / Dockerfile
Created July 17, 2019 21:56
Docker tutorial part3
# Use an official Python runtime as a parent image
FROM python:2.7-slim
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
@ahamid
ahamid / postcss-function-sass-color-mod
Created September 18, 2019 17:26
implement sass color functions on top of postcss-color-function/postcss-functions
// reproduce sass darken/lighten/fade function syntax on top of
// postcss-color-function (https://github.com/postcss/postcss-color-function) via
// postcss-functions https://github.com/andyjansson/postcss-functions
// https://github.com/jonathantneal/precss/issues/38
// postcss-sass-colors.js
const colorFn = require('css-color-function')
function applyFn(value, fn, frac) {
return colorFn.convert('color(' + value + ' ' + fn + '(' + frac + '))')
@ahamid
ahamid / machine.js
Created January 20, 2022 21:20
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions