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
| module Universities | |
| module Reporting | |
| class AmbassadorsQuery | |
| include ::DateUtils | |
| attr_reader :date_range, :university | |
| def initialize(university, date_range:) | |
| @university = university | |
| @date_range = date_range |
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
| ## docker-compose.yml | |
| version: '3' | |
| services: | |
| web: | |
| command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" | |
| image: nginx | |
| volumes: | |
| - ./nginx:/etc/nginx | |
| - ./data/certbot/conf:/etc/letsencrypt | |
| - ./data/certbot/www:/var/www/certbot |
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
| events { } | |
| http { | |
| upstream puma_app_1 { | |
| server 172.31.7.63:3000; | |
| } | |
| server { | |
| listen 80 default; |
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
| ## folder structure | |
| # /database | |
| # /postgresql | |
| # /shared | |
| # /docker-compose.yml | |
| ## docker-compose.yml | |
| version: '3.5' | |
| services: | |
| db: |
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 dovkerhub_user/base_images:funfront0.1 AS builder | |
| ENV CDN_ROUTE "$CDN_ROUTE" | |
| ENV NEXT_PUBLIC_API_ROUTE "$NEXT_PUBLIC_API_ROUTE" | |
| ENV BUCKET "$BUCKET" | |
| ENV AWS_ACCESS_KEY_ID "$AWS_ACCESS_KEY_ID" | |
| ENV AWS_SECRET_ACCESS_KEY "$AWS_SECRET_ACCESS_KEY" | |
| RUN npm install -g i18nexus-cli |
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
| def fizzbuzz(n = 100) | |
| n.times{|i| i.zero? ? puts(i) : (i%3).zero? && (i%5).zero? ? puts('FizzBuzz') : (i%3).zero? ? puts('Fizz') : (i%5).zero? ? puts('Buzz') : puts(i)} | |
| end |
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
| function generateGuid() { | |
| let result = ''; | |
| let n = 0; | |
| while (n < 32) { | |
| result += | |
| (~[8, 12, 16, 20].indexOf(n++) ? '-' : '') + | |
| Math.floor(Math.random() * 16).toString(16); | |
| } | |
| return result; | |
| } |
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
| Note: help and version output are generated by a naïve script which tries a few variants of <command> --help, <command> -h etc. to find the command's help and version info. Sometimes it gets lucky, sometimes it doesn't; if the output below looks wrong, it probably is. | |
| pg_dump --version (return code: 0) | |
| pg_dump (PostgreSQL) 9.5.6 | |
| pg_dump --help (return code: 0) | |
| pg_dump dumps a database as a text file or to other formats. | |
| Usage: | |
| pg_dump [OPTION]... [DBNAME] | |
| General options: |
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
| #!/bin/sh | |
| git filter-branch --env-filter ' | |
| OLD_EMAIL="[email protected]" | |
| CORRECT_NAME="AlexAndreiev" | |
| CORRECT_EMAIL="[email protected]" | |
| if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
| then | |
| export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
| export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
NewerOlder