Skip to content

Instantly share code, notes, and snippets.

View sshevlyagin's full-sized avatar

Sergei Shevlyagin sshevlyagin

View GitHub Profile
@sshevlyagin
sshevlyagin / Multiple-decoders.md
Created July 23, 2020 13:36
Multiple-decoders wiki article for open-feign

If you want to use multiple decoders in your Feign builder, you can initialize the decoder Bean as follows.

@Bean
public Decoder decoder() {
    Decoder decoder = (response, type) -> {
        if (type.getTypeName().equals("java.lang.String") ||
                type.getTypeName().equals("byte[]")
        ) {
 return new Decoder.Default().decode(response, type);
@sshevlyagin
sshevlyagin / errors-2
Created May 24, 2019 21:11
Errors when trying to build strava for asp.net core 2.1 with swagger-codegen 2
/usr/local/share/dotnet/sdk/2.2.107/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ObsoleteReferences.targets(33,5): warning NETSDK1059: The tool 'Microsoft.Extensions.SecretManager.Tools' is now included in the .NET Core SDK. Information on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box). [/Users/sergeishevlyagin/dev/StravaASP-2/src/IO.Swagger/IO.Swagger.csproj]
/usr/local/share/dotnet/sdk/2.2.107/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ObsoleteReferences.targets(33,5): warning NETSDK1059: The tool 'Microsoft.DotNet.Watcher.Tools' is now included in the .NET Core SDK. Information on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box). [/Users/sergeishevlyagin/dev/StravaASP-2/src/IO.Swagger/IO.Swagger.csproj]
Restore completed in 176.74 ms for /Users/sergeishevlyagin/dev/StravaASP-2/src/IO.Swagger/IO.Swagger.csproj.
Restore completed in 109.14 ms for /Users/sergeishevlyagin/dev/StravaASP-2/src/IO.Swagger/IO.Swagger.csproj.
Microsoft (R) Build Engi
@sshevlyagin
sshevlyagin / errors-3
Created May 24, 2019 21:10
Errors when trying to build strava for asp.net core 2.1 with swagger-codegen 3
/usr/local/share/dotnet/sdk/2.2.107/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ObsoleteReferences.targets(33,5): warning NETSDK1059: The tool 'Microsoft.Extensions.SecretManager.Tools' is now included in the .NET Core SDK. Information on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box). [/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj]
/usr/local/share/dotnet/sdk/2.2.107/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ObsoleteReferences.targets(33,5): warning NETSDK1059: The tool 'Microsoft.DotNet.Watcher.Tools' is now included in the .NET Core SDK. Information on resolving this warning is available at (https://aka.ms/dotnetclitools-in-box). [/Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj]
Restoring packages for /Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj...
Restoring packages for /Users/sergeishevlyagin/dev/StravaASP-3/src/IO.Swagger/IO.Swagger.csproj...
Restore completed in 3.41 sec for /Users/s
@sshevlyagin
sshevlyagin / My Note.enex
Created February 9, 2019 15:57
Note enex after upload from Zapier
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd">
<en-export export-date="20190209T155422Z" application="Evernote" version="Evernote Mac 7.8 (457454)">
<note>
<title>Feb 9, 2019 Journal</title>
<content>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><table style="border-collapse: collapse;">
<colgroup>
<col style=""></col>
</colgroup>
@sshevlyagin
sshevlyagin / multi.py
Created November 30, 2018 10:51
Generate multi part mime files on OS X for User Data on EC2 Container Service (ECS)
#!/usr/local/bin/python
# Usage
# python utils/multi.py /path/to/cloud.cfg:text/cloud-config /path/to/script.sh:text/x-shellscript
import sys
import email
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
if len(sys.argv) == 1:
@sshevlyagin
sshevlyagin / gist:6878470
Last active December 24, 2015 23:09 — forked from larryisthere/gist:3291905
Installing Django/Postgresql on OS X 10.8.5 as of 10/7/13

Command Line Tools for Xcode

Command line tools comes bundle with Xcode prior to 4.3 version. After 4.3, you need to install a separated command line tools yourself.

First, go to this url and login using Apple Developer account (Free to register)

https://developer.apple.com/downloads/index.action
@sshevlyagin
sshevlyagin / brew doctor
Created October 8, 2013 02:14
Gist for ticet
sergeis-mbpr:Homebrew sergeis$ brew doctor
Warning: /usr/local/share/python is not needed in PATH.
Formerly homebrew put Python scripts you installed via `pip` or `pip3`
(or `easy_install`) into that directory above but now it can be removed
from your PATH variable.
Python scripts will now install into /usr/local/bin.
You can delete anything, except 'Extras', from the /usr/local/share/python
(and /usr/local/share/python3) dir and install affected Python packages
anew with `pip install --upgrade`.

Command Line Tools for Xcode

Command line tools comes bundle with Xcode prior to 4.3 version. After 4.3, you need to install a separated command line tools yourself.

First, go to this url and login using Apple Developer account (Free to register)

https://developer.apple.com/downloads/index.action