Skip to content

Instantly share code, notes, and snippets.

View Robert-96's full-sized avatar

Dezmerean Robert Robert-96

View GitHub Profile
@Robert-96
Robert-96 / README.md
Last active March 27, 2025 03:22
Ember.Js: Installing Tailwind CSS

Ember.Js: Installing Tailwind CSS

TL;DR

$ ember install ember-cli-postcss                   # Install ember-cli-postcss
$ npm install --save-dev tailwindcss                # Install tailwindcss

$ npx tailwind init app/styles/tailwind.config.js   # Optional: Generate a Tailwind config file for your project  
$ npm install -save-dev postcss-import # Optional: If you want to use the @import statement
@Robert-96
Robert-96 / README.md
Last active July 5, 2020 21:59
Python3 CLI Tools

Python3 CLI Tools

TL;DR

$ python -m http.server                           # Create a webserver serving files relative to the current directory
$ python -m http.server 8080                      # Start the webserver on port 8080
$ python -m http.server -b 127.0.0.1              # Bind the webserver to 127.0.0.1    
$ python -m http.server -d path/to/files          # Serve files relative to path/to/files  
@Robert-96
Robert-96 / README.md
Last active September 19, 2020 10:09
WIP: cURL Cheat Sheet

cURL Cheat Sheet

TL;DR

$ curl www.example.com

Table of contents

@Robert-96
Robert-96 / README.md
Last active November 28, 2020 17:00
WIP: grep Cheat Sheet

grep Cheat Sheet

grep prints lines that match a pattern, the name comes from the phrase "global regular expression print".

@Robert-96
Robert-96 / README.md
Last active December 26, 2020 01:15
Docker Cheat Sheet

Docker Cheat Sheet

TL;DR

$ docker build -t my-image .                           # Create image using this directory's Dockerfile

$ docker run -p 4200:80 my-image                       # Run "my-image" mapping port 4200 to 80
$ docker run -d -p 4200:80 my-image                    # Same thing, but in detached mode
$ docker run username/repository:tag                   # Run image from a registry
@Robert-96
Robert-96 / cli.py
Created February 26, 2019 10:53
Click help option with `--help` and `-h`
import click
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
@Robert-96
Robert-96 / cli.py
Last active January 17, 2020 13:05
Click version option with `--version` and `-v`
import click
# the version number to show. If None Click attempts an auto discovery via setuptools.
VERSION = "0.1"
@click.group()
@click.version_option(VERSION, "-v", "--version")
def cli():
pass