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
| [ | |
| { | |
| "userId": 1, | |
| "id": 1, | |
| "title": "delectus aut autem", | |
| "completed": false | |
| }, | |
| { | |
| "userId": 1, | |
| "id": 2, |
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 { ObjectType, Field } from "@nestjs/graphql"; | |
| @ObjectType() | |
| export class PageInfo { | |
| @Field({ nullable: true }) | |
| startCursor: string; | |
| @Field({ nullable: true }) | |
| endCursor: string; |
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
| # one or the other, NOT both | |
| [url "https://github"] | |
| insteadOf = git://github | |
| # or | |
| [url "[email protected]:"] | |
| insteadOf = git://github |
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 { SetMetadata } from '@nestjs/common'; | |
| export interface SelfDecoratorParams { | |
| userIDParam: string; | |
| allowAdmins?: boolean; | |
| } | |
| export const Self = (params: SelfDecoratorParams | string) => | |
| SetMetadata( | |
| 'selfParams', |
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
| # See list of docker virtual machines on the local box | |
| $ docker-machine ls | |
| NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS | |
| default * virtualbox Running tcp://192.168.99.100:2376 v1.9.1 | |
| # Note the host URL 192.168.99.100 - it will be used later! | |
| # Build an image from current folder under given image name | |
| $ docker build -t gleb/demo-app . |
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
| #!/usr/bin/env bash | |
| set -fb | |
| readonly VERSION=0.0.1 | |
| readonly USER_LOCAL="/usr/local/bin" | |
| readonly TMP="/tmp/rbase" # update in toml | |
| readonly MY_NAME=$(basename "$0") | |
| readonly FILE_TO_FETCH_URL="https://gist.github.com/tauqeernasir/fb8cd47ebf9a57301fd13b326247a3b4/raw" | |
| readonly EXISTING_SHELL_SCRIPT="${TMP}/dev-server-existing" |
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
| #!/usr/bin/env bash | |
| VERSION="0.0.2" | |
| SCRIPT_URL='https://gist.github.com/tauqeernasir/031e58887c9ee3c13748fe79265df06f/raw' | |
| SCRIPT_DESCRIPTION="" | |
| SCRIPT_LOCATION="${BASH_SOURCE[@]}" | |
| rm -f updater.sh | |
| function update() | |
| { |
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
| // ANY AJAX LIBARARY CAN BE USED | |
| // `responseType: blob` is important | |
| axios({ | |
| url: 'http://localhost:9000/url/to/example.pdf', | |
| method: 'POST', | |
| responseType: 'blob', // important | |
| }).then((response) => { | |
| const url = window.URL.createObjectURL(new Blob([response.data])); | |
| const link = document.createElement('a'); | |
| link.href = url; |