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
public static class AwsS3Helper | |
{ | |
public static async Task UploadObjectStreamAsync( | |
this IAmazonS3 s3Client, | |
Stream stream, | |
UploadStreamToS3Request request) | |
{ | |
async IAsyncEnumerable<UploadPartResponse> UploadAsync(string uploadId) | |
{ | |
await foreach (var (partStream, index, isLast) in SplitPartsFromStream(stream, request.ParSize)) |
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
<mtTheme> | |
<id>one-dark-deep</id> | |
<editorColorsScheme>one-dark-deep</editorColorsScheme> | |
<dark>true</dark> | |
<name>one-dark-deep</name> | |
<colors> | |
<color id="background" value="1c1f25ff"/> | |
<color id="foreground" value="b0b9bdff"/> | |
<color id="text" value="9ba5a8ff"/> | |
<color id="highlight" value="3e4a5dff"/> |
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
namespace Application.Infrastructures.Filters | |
{ | |
public class ValidateModelAttribute : ActionFilterAttribute | |
{ | |
private readonly ConcurrentDictionary<string, IList<string>> _bodyParameters = new ConcurrentDictionary<string, IList<string>>(); | |
public override void OnActionExecuting(HttpActionContext actionContext) | |
{ | |
base.OnActionExecuting(actionContext); | |
var request = actionContext.Request; |
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
name := "programming-scala" | |
version := "1.0" | |
scalaVersion := "2.11.7" | |
libraryDependencies ++= Seq( | |
"org.scala-lang" % "scala-swing" % "2.11+", | |
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3", | |
"com.typesafe.akka" %% "akka-actor" % "2.4.1", |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ name: 'lastConnectedFormat' }) | |
export class LastConnectedTimeFormatPipe implements PipeTransform { | |
transform(connectedTime: Date, ...args): string { | |
let elapsed = new Date(new Date().getTime() - connectedTime.getTime()).getTime() / 60000; | |
let time: string = ''; | |
if (elapsed < 60) { |
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 { BaseRequestOptions, Headers, RequestOptions, RequestOptionsArgs } from '@angular/http'; | |
import { Injectable } from '@angular/core'; | |
@Injectable() | |
export class BaseCommonRequestOptions extends BaseRequestOptions { | |
merge(options?: RequestOptionsArgs): RequestOptions { | |
return new CommonRequestOptions(super.merge(extracted(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
git config --global alias.st status | |
git config --global alias.br branch | |
git config --global alias.co checkout | |
git config --global alias.cm "commit -m " | |
git config --global alias.l 'log --color --graph --pretty=oneline --decorate --date=short --abbrev-commit --branches' | |
git config --global alias.ds 'diff --stat' | |
git config --global diff.tool vimdiff | |
git config --global merge.tool vimdiff | |
git config --global difftool.prompt false |
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 Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import firebase from 'firebase' | |
import {Message} from 'element-ui' | |
import signIn from './sign-in.vue' | |
Vue.use(VueRouter); | |
var routes = { | |
root: { |
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 Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import firebase from 'firebase' | |
import signIn from './sign-in.vue' | |
Vue.use(VueRouter); | |
const router = new VueRouter({ | |
routes: [ | |
{ |
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 Vue from 'vue' | |
import VueRouter from 'vue-router' | |
import firebase from 'firebase' | |
import signIn from './sign-in.vue' | |
Vue.use(VueRouter); | |
const router = new VueRouter({ | |
routes: [ | |
{ |