Skip to content

Instantly share code, notes, and snippets.

View gn-spawn's full-sized avatar
🏠
Working from home

spawn gn-spawn

🏠
Working from home
View GitHub Profile
@gn-spawn
gn-spawn / .zshrc
Created July 17, 2017 09:17
mange.zshrc
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
export LANGUAGE="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export PATH=$PATH:/Users/spawn00/Library/Android/sdk/platform-tools
alias lessc=“~/node_modules/less/bin/lessc”
export PATH="$HOME/.anyenv/bin:$PATH"
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdLCHc0cLkCXXlRQFt4PW83RCya/1MWVkAHWGF8rN1EqEsXOW49xydpDH25zcdlHKZsnoCx4nIAhu+er96A3EaFKrYxXpdHURjmKYId7Ys+oskytfR/WUzihVA/kT6s7WnOscLThM/CVExF3xgwbCV7uSYc4mcYXJpOXObZ8WfkHHmlW25voyautYtSzQZJtZRQlwbAwwSS/sloXbr82qlESseX7imYTQ+aorPduwQk2klLc+4zR7XkyU9iZCT03xSQxgNCHWvuwzDxC6EP1EJu89goi5w8EQwCEc9brpmDWZrBDrHrVVDTRikFfnkqq3tFKxiy56FvMvpKt6JrCWl [email protected]
// 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"
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 + "が追加されました");
}
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;
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();
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;
@gn-spawn
gn-spawn / style.css
Last active October 18, 2016 01:27
for markdown
.highlight {
visibility: hidden;
}
void setup() {
size(512,512);
background(0);
noStroke();
}
int mojim[][][] = {
{{50, 450}, {50, 50}},
{{50, 50}, {250, 200}},
{{250, 200}, {450, 50}},
@gn-spawn
gn-spawn / nokogiriTest.rb
Created September 30, 2015 05:27
sample
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