Skip to content

Instantly share code, notes, and snippets.

@kosh04
Created August 29, 2015 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosh04/eb17dd2d177469755565 to your computer and use it in GitHub Desktop.
Save kosh04/eb17dd2d177469755565 to your computer and use it in GitHub Desktop.
GitHub Markdown APIをコマンドラインで利用
@echo off
setlocal
set api_url=https://api.github.com/markdown/raw
if exist "%1" (
set input=%1
) else (
set input=-
)
curl -sk --data-binary "@%input%" --header "Content-Type: text/plain" %api_url%
#!/bin/sh
api_url=https://api.github.com/markdown/raw
curl -s --data-binary "@${1:--}" --header "Content-Type: text/plain" $api_url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment