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
marked.setOptions({ | |
langPrefix: '' | |
}); | |
var html = marked(src); | |
$('#src').html(html); | |
$('#src pre code').each(function(i, block) { | |
hljs.highlightBlock(block, block.className); | |
}); |
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
<link rel="stylesheet" href="css/ext/github.css" type="text/css" /> | |
<script type="text/javascript" src="js/ext/highlight.pack.js"></script> |
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
<script type="text/javascript" src="marked.js"></script> |
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
var params = { | |
'client_id': clientID, // 登録したアプリのクライアントID | |
'client_secret': clientSecret, // 登録したアプリのクライアントシークレット | |
'code': code // リダイレクトURLのクエリのcodeの値 | |
}; | |
$.ajax({ | |
url: getAPIURL('https://qiita.com/api/v2/access_tokens'), | |
type: 'POST', | |
headers: { |
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
self.cb = window.open(url, '_blank', 'location=no,toolbar=no,clearsessioncache=yes'); | |
self.cb.addEventListener('loadstart', function(e) { | |
var loc = e.url; | |
if (loc.indexOf(REDIRECT_URL) != -1) { | |
// 認可完了後の処理 | |
return; | |
} | |
}); |
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
$ cordova plugin add [プラグインのID] |
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
var user = 'YOUR_NAME'; // ユーザ名 | |
var access_token = 'YOUR_ACCESS_TOKEN'; // アクセストークン | |
$.ajax({ | |
url: 'https://qiita.com/api/v1/users/' + user + '/items?token=' + access_token, | |
type: 'GET', | |
dataType: 'json', | |
scriptCharset: 'utf-8', | |
success: function(res) { | |
// 成功した時の処理 |
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
var user = 'YOUR_NAME'; // ユーザ名 | |
$.ajax({ | |
url: 'https://qiita.com/api/v1/users/' + user + '/items', | |
type: 'GET', | |
dataType: 'json', | |
scriptCharset: 'utf-8', | |
success: function(res) { | |
// 成功した時の処理 | |
}, |
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 clone https://github.com/madrobby/zepto.git | |
$ cd zepto | |
$ npm install | |
$ MODULES="zepto event ajax form ie touch" npm run-script dist | |
$ ls dist | |
zepto.js zepto.min.gz zepto.min.js |
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 bpy | |
import bmesh # 追加でインポートが必要 | |
obj = bpy.context.active_object | |
bpy.ops.object.mode_set(mode='EDIT') # 処理はEDITモードで行う必要がある | |
bm = bmesh.from_edit_mesh(obj.data) | |
# blenderのバージョンが2.73以上の時に必要 | |
if bpy.app.version[0] >= 2 and bpy.app.version[1] >= 73: |