Skip to content

Instantly share code, notes, and snippets.

View jincod's full-sized avatar

Vadim Abdrashitov jincod

View GitHub Profile
version: "3"
services:
nginx:
image: nginx:1.19-alpine
container_name: nginx
restart: always
ports:
- 80:80
- 443:443
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
build: ## Buids docker compose file in this directory
docker-compose -f docker-compose.yml build $(c)
@jincod
jincod / StartupConfigure.cs
Last active January 19, 2022 18:20
Ensure https for ASP.NET Core apps on Heroku
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsProduction())
{
app
.UseForwardedHeaders()
.UseHttpsRedirection();
}
// ...
}
@jincod
jincod / index.js
Last active October 10, 2018 17:12
Test npx command
#!/usr/bin/env node
console.log(require('./package.json').version);
console.log(process.argv);
@jincod
jincod / bitbucket-pipelines.yml
Created October 6, 2018 15:52
Docker deployment using Bitbucket Pipelines and Heroku
pipelines:
default:
- step:
name: build and publish docker image
services:
- docker
caches:
- docker
script:
- docker build -t $APP_NAME .
@jincod
jincod / README.md
Created July 25, 2018 06:31
Deploying AWS Lambda using Serverless Framework to VPC

Diagram

@jincod
jincod / codemod.ps1
Created June 21, 2018 06:37
jscodeshift codemod for material-ui
gci -Include *.js,*.jsx -Recurse | % {npm run jscodeshift -- -t material-core.js $_.FullName }
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Cloudformation stack to manage permission to deploy a serverless service'
Parameters:
ServiceName:
Description: Name of the Service you want to deploy
Type: String
Resources:
FROM microsoft/windowsservercore:ltsc2016 as download
ENV RUBY_VERSION 2.5.0.1
ENV RUBYGEMS_VERSION 2.7.4
ENV BUNDLER_VERSION 1.16.1
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV chocolateyUseWindowsCompression=false
@jincod
jincod / default.ps1
Created October 5, 2017 06:45
Multiple adding csproj to sln using dotnet cli
gci . -Filter *.csproj -Recurse | ? { $_.FullName -notmatch 'OldS'} | select-Object -expandproperty FullName | % {dotnet sln add $_}