This file contains 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
# -*- coding: utf-8 -*- | |
from fabric.api import run, sudo, cd | |
from fabric.contrib.files import sed, append, contains | |
def execute(): | |
update() | |
rbenv_install() | |
ruby_and_rails_install() | |
all_port_open() |
This file contains 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
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "centos7-updated-20150209" | |
config.vm.box_url = "https://www.dropbox.com/s/ojfambfh4m40c0t/centos7-updated-20150209.box?dl=1" | |
config.vm.provision :fabric do |fabric| | |
fabric.fabfile_path = "./provision.py" | |
fabric.tasks = ["execute"] |
This file contains 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
require 'open-uri' | |
require 'nokogiri' | |
URL = 'http://heavens-fox.blog.jp/' | |
html = open(URL) { |f| f.read } | |
doc = Nokogiri::HTML.parse(html, nil) | |
class BabymetalArticle | |
def initialize(article) | |
@title = article.css("h1.article-title > a").text |
This file contains 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
void setup() { | |
size(512,512); | |
background(0); | |
noStroke(); | |
} | |
int mojim[][][] = { | |
{{50, 450}, {50, 50}}, | |
{{50, 50}, {250, 200}}, | |
{{250, 200}, {450, 50}}, |
This file contains 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
.highlight { | |
visibility: hidden; | |
} |
This file contains 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
package ex5; | |
import org.w3c.dom.Document; | |
import org.w3c.dom.NodeList; | |
import org.xml.sax.SAXException; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.parsers.ParserConfigurationException; | |
import javax.xml.xpath.XPath; | |
import javax.xml.xpath.XPathConstants; |
This file contains 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
private ArrayList<String> getTweets(String hashtag, String user_name) { | |
NodeList nodeList = null; | |
ArrayList<String> tweets = new ArrayList<String>(); | |
try { | |
URL url = new URL("https://queryfeed.net/tw?q=%23" + URLEncoder.encode(hashtag, "UTF-8") + "+%40" + user_name + "&title-type=user-name-both&geocode="); | |
URLConnection urlConnection = url.openConnection(); | |
urlConnection.connect(); | |
InputStream inputStream = urlConnection.getInputStream(); | |
// DOM取得 | |
DocumentViewer documentViewer = new DocumentViewer(); |
This file contains 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
package jp.ac.dendai.im.web; | |
import org.w3c.dom.Document; | |
import org.w3c.dom.Node; | |
import org.w3c.dom.bootstrap.DOMImplementationRegistry; | |
import org.w3c.dom.ls.DOMImplementationLS; | |
import org.w3c.dom.ls.LSInput; | |
import org.w3c.dom.ls.LSParser; | |
import java.io.InputStream; | |
import java.net.URL; |
This file contains 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
ArrayList<String> tweets = mashup.getTweets("スポーンメモ", "gn_spawn"); | |
ArrayList<String> diff = new ArrayList<String>(tweets); | |
diff.removeAll(cache); | |
cache = tweets; | |
for (String tw : diff) { | |
System.out.println(tw + "が追加されました"); | |
} |
This file contains 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
// Place your settings in this file to overwrite the default settings | |
{ | |
"files.autoSave": "afterDelay", | |
"editor.fontSize": 14, | |
"typescript.check.tscVersion": false, | |
"editor.tabSize": 2, | |
"editor.insertSpaces": true, | |
// HTML, JavaScript, Vue | |
"files.associations": { | |
"*.vue" : "vue" |
OlderNewer