Skip to content

Instantly share code, notes, and snippets.

View daminhtung's full-sized avatar
💭
How to code by hand?

Nguyen Van Tung daminhtung

💭
How to code by hand?
  • Ha Noi - VietNam
View GitHub Profile

Docker

  1. Build Image:

docker build -t <your username>/node-web-app .

  1. Run Docker image:

docker run -p 49160:8080 -d <your username>/node-web-app

  1. Go inside Docker Container:
@daminhtung
daminhtung / .eslintrc
Created May 24, 2020 13:16 — forked from abhishekbhardwaj/.eslintrc
ESLint for Typescript powered React Native Projects
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"universe/native",
"plugin:prettier/recommended"
],
"plugins": ["@typescript-eslint"],
"settings": {
"import/resolver": {
@daminhtung
daminhtung / .eslintrc
Created May 24, 2020 13:16 — forked from abhishekbhardwaj/.eslintrc
ESLint for Typescript powered React Native Projects
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"universe/native",
"plugin:prettier/recommended"
],
"plugins": ["@typescript-eslint"],
"settings": {
"import/resolver": {
// MARK: - Adding a header to a single request
func doRequestWithHeaders1() {
let headers: HTTPHeaders = [
"X-Mashape-Key": MY_API_KEY,
"Accept": "application/json"
]
Alamofire.request("https://mashape-community-urban-dictionary.p.mashape.com/define?term=smh", headers: headers)
.responseJSON { response in
debugPrint(response)
@daminhtung
daminhtung / curl.md
Created July 9, 2019 01:41 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.