$ 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.7.1-slim AS base | |
| LABEL maintainer="Yann Defretin <yann@defret.in" | |
| # Common dependencies | |
| RUN apt-get update -qq \ | |
| && DEBIAN_FRONTEND=noninteractive apt-get install -yq \ | |
| --no-install-recommends \ | |
| build-essential=12.6 \ | |
| gnupg2=2.2.12-1+deb10u1 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
| const axios = require('axios'); // promised based requests - like fetch() | |
| function getCoffee() { | |
| return new Promise(resolve => { | |
| setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.6.3-alpine3.9 | |
| RUN apk update && apk add libpq nodejs | |
| ENV RAILS_ROOT /app | |
| RUN mkdir -p $RAILS_ROOT | |
| ENV BUNDLER_VERSION 2.0.2 | |
| WORKDIR $RAILS_ROOT | |
| RUN echo 'gem: --no-ri --no-rdoc' > ~/.gemrc | |
| COPY Gemfile Gemfile | |
| COPY Gemfile.lock Gemfile.lock | |
| RUN apk add --virtual build-dependencies build-base gcc wget git postgresql-dev \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.3" | |
| services: | |
| ################################################ | |
| #### Traefik Proxy Setup ##### | |
| ############################################### | |
| traefik: | |
| image: traefik:v2.0 | |
| restart: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Request, Response } from 'express'; | |
| import { Body, Controller, Post, Req, Res } from '@nestjs/common'; | |
| import { UserService } from './user.service'; | |
| import * as Redis from 'ioredis'; | |
| import { RateLimiterRedis } from 'rate-limiter-flexible'; | |
| const redisClient = new Redis({enableOfflineQueue: false}); | |
| const maxWrongAttemptsByIPperDay = 100; | |
| const maxConsecutiveFailsByUsernameAndIP = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2.2' | |
| services: | |
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1 | |
| container_name: elasticsearch | |
| environment: | |
| - cluster.name=docker-cluster | |
| - bootstrap.memory_lock=true | |
| - "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
| ulimits: |
https://github.com/ankane/searchkick
By default, simply adding the call 'searchkick' to a model will do an unclever indexing of all fields (but not has_many or belongs_to attributes).
In practice, you'll need to customize what gets indexed. This is done by defining a method on your model called search_data
def search_data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
| [metadata] | |
| name = {name} | |
| version = file: {name}/_version.txt | |
| author = Martin Larralde | |
| author_email = martin.larralde@embl.de | |
| url = https://github.com/althonos/{name} | |
| description = {description} | |
| long_description = file: README.md |
