Skip to content

Instantly share code, notes, and snippets.

@rmswimkktt
rmswimkktt / markdown-cheatsheet.md
Created October 18, 2020 08:12 — forked from mignonstyle/markdown-cheatsheet.md
Markdown記法 チートシート

Block Elements ## Headers 見出し 先頭に#をレベルの数だけ記述します。 ```

見出し1

見出し2

見出し3

見出し4

見出し5
見出し6
## 見出し2
### 見出し3
#### 見出し4
##### 見出し5
###### 見出し6 ## Block 段落 空白行を挟むことで段落となります。 ```
段落1
(空行)
段落2
``` 段落1 段落2 ## Br 改行 改行の前に半角スペース` `を2つ記述します。 ```
hoge
fuga(スペース2つ)
piyo
``` hoge
fuga piyo ## Blockquotes 引用 先頭に`>`を記述します。ネストは`>`を多重に記述します。 ```
> 引用 > 引用
>> 多重引用
``` > 引用 > 引用
>> 多重引用 ## Code コード `` `バッククオート` `` 3つ、あるいはダッシュ`~`3つで囲みます。 ```
print 'hoge'
``` ```
print 'hoge'
``` ### インラインコード `` `バッククオート` `` で単語を囲むとインラインコードになります。 ```
これは `インラインコード`です。
``` これは `インラインコード`です。 ## pre 整形済みテキスト 半角スペース4個もしくはタブで、コードブロックをpre表示できます ``` class Hoge def hoge print 'hoge' end end
``` class Hoge def hoge print 'hoge' end end ## Hr 水平線 アンダースコア`_` 、アスタリスク`*`、ハイフン`-`などを3つ以上連続して記述します。 ```
hoge
***
hoge
___
hoge
---
``` hoge
***
hoge
___
hoge
--- # Lists ## Ul 箇条書きリスト ハイフン`-`、プラス`+`、アスタリスク`*`のいずれかを先頭に記
@rmswimkktt
rmswimkktt / DateFormat.java
Created November 16, 2013 12:19
CalendarからDateに変換して文字列整形
calendar = Calendar.getInstance();
calendar.set(2013, 1 - 1, 1, 0, 0, 0);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/M/d H:mm:ss");
String date = dateFormat.format(calendar.getTime());
PoolingClientConnectionManager cm = new PoolingClientConnectionManager();
cm.setMaxTotal(100);
DefaultHttpClient client = new DefaultHttpClient(cm);
HttpPost post = new HttpPost(url);
HttpResponse response = client.execute(post);
@rmswimkktt
rmswimkktt / gist:5532567
Created May 7, 2013 13:30
メソッドに複数の引数を渡す方法で、知らない書き方(multiArgument1)があった…。
public class MultiArgument {
public static void main(String[] args) {
MultiArgument.multiArgument1("Apple", "Orage", "Grape");
String[] strings = {"Apple", "Orage", "Grape"};
MultiArgument.multiArgument2(strings);
}
public static void multiArgument1(String... strings){
fatal: remote staging already exists.
Joining application hound-staging... failed
! Application does not exist or does not belong to an org that you have access to.
fatal: remote production already exists.
Joining application hound-production... failed
! Application does not exist or does not belong to an org that you have access to.
An error occurred while installing pg (0.17.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.0'` succeeds before bundling.
Could not find pg-0.17.0 in any of the sources
An error occurred while installing capybara-webkit (1.1.1), and Bundler cannot
continue.
Make sure that `gem install capybara-webkit -v '1.1.1'` succeeds before
bundling.
Could not find capybara-webkit-1.1.1 in any of the sources
Run `bundle install` to install missing gems.
[xxxxxxxx@yyyyyyyy zzzzz]$bash <(curl -Ls http://git.io/eUx7rg)
Downloading MySQL Installers ... may take a few moments
######################################################################## 100.0%
...
...
Installing MySQL, administrator password required ...
Password:
installer: Package name is MySQL 5.6.17-community for Mac OS X
installer: Installing at base path /
installer: The install was successful.
[xxxxxxxx@yyyyyyyy zzzzz]$rake environment -v -t RAILS_ENV=development db:schema:dump
Could not find gem 'mysql2 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
[xxxxxxxx@yyyyyyyy zzzzz]$bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.3.1)
Using i18n (0.6.9)
Using minitest (4.7.5)