- Google Chrome
- Cmder
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 CommentBox = React.createClass({ | |
| loadCommentsFromServer: function() { | |
| $.ajax({ | |
| url: this.props.url, | |
| dataType: 'json', | |
| success: function(data) { | |
| this.setState({data: data}); | |
| }.bind(this), | |
| error: function(xhr, status, err) { | |
| console.error(this.props.url, status, err.toString()); |
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 props = { | |
| // Chrome | |
| pc:{ | |
| ua: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36", | |
| //viewport: { width: 2560, height: 1440 } | |
| viewport: { width: 640, height: 480 } | |
| }, | |
| // iPhone 5, iOS 8.0.2 | |
| mobile: { | |
| ua: "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A405 Safari/600.1.4", |
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
| file = File.open('materialcolors.txt') | |
| file.each_line do |hex| | |
| hex.gsub! "\n", "" | |
| cmd = "convert -size 15x15 xc:##{hex} result/#{hex}.png" | |
| system(cmd) | |
| end |
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
| set scalehints | |
| set smoothscroll | |
| let scrollduration = 300 | |
| let hintcharacters = "asdgwetcvb" | |
| copyThisPageTitle() -> {{ | |
| var text = document.title || (document.querySelector("title") || {}).innerText || ''; | |
| RUNTIME('copy', { text: text }); | |
| Status.setMessage(text, 2); | |
| }} |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| module.exports = { | |
| context: __dirname + '/src', | |
| entry: { | |
| javascript: './app.js', | |
| }, | |
| output: { |
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
| const fetch = require('node-fetch'); | |
| const cheerio = require('cheerio'); | |
| urls = [] | |
| urls.push('http://qiita.com/horike37/items/b295a91908fcfd4033a2') | |
| urls.push('http://qiita.com/ryo0301/items/7f9fd8024987526cbc30') | |
| urls.push('http://inokara.hateblo.jp/entry/2017/04/30/092304') | |
| urls.push('https://togetter.com/li/1105672') | |
| urls.push('https://allabout.co.jp/gm/gc/469010/') | |
| urls.push('http://anond.hatelabo.jp/20170429110724') |
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
| {"lastUpload":"2018-11-18T15:12:33.419Z","extensionVersion":"v3.2.0"} |