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
config.vm.box = "hashicorp/precise64" | |
# 下のconfig.vm.box_urlは特に使わなくても平気なのでコメントアウトするか削除する | |
# config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" | |
end |
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 main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"strings" | |
"time" |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function, unicode_literals | |
import argparse | |
import os | |
from bs4 import BeautifulSoup as bs | |
def build_parser(): |
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 main | |
import ( | |
"encoding/csv" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" |
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
var gulp = require('gulp'); | |
var shell = require('gulp-shell'); | |
gulp.task('build-slim', function() { | |
gulp.src('./*.slim').pipe(shell([ | |
'slimrb -p <%= file.path %> > ./output/<%= file.relative.replace(".slim", ".html") %>' | |
])); | |
}); | |
gulp.task('watch', function() { |
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
var gulp = require("gulp"); | |
var slim = require("gulp-slim"); | |
gulp.task('slim', function(){ | |
gulp.src("./*.slim") | |
.pipe(slim({ | |
pretty: true | |
})) | |
.pipe(gulp.dest("./output/")); | |
}); |
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
var gulp = require("gulp"); | |
var slim = require("gulp-slim"); | |
var browserSync = require("browser-sync"); | |
gulp.task('slim', function(){ | |
gulp.src("./*.slim") | |
.pipe(slim({ | |
pretty: true | |
})) | |
.pipe(gulp.dest("./output/")); |
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
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var sass = require('gulp-sass'); | |
var source = require('vinyl-source-stream'); | |
var babelify = require('babelify'); | |
var watchify = require('watchify'); | |
var exorcist = require('exorcist'); | |
var browserify = require('browserify'); | |
var browserSync = require('browser-sync').create(); |
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
// Hacking with Swiftオリジナルのコード | |
// from https://www.hackingwithswift.com/read/4/3/choosing-a-website-uialertcontroller | |
func openPage(action: UIAlertAction!) { | |
let url = NSURL(string: "https://" + action.title!)! | |
webView.loadRequest(NSURLRequest(URL: url)) | |
} | |
// if letを使って書きかえてみたコード | |
func openPage(action: UIAlertAction!){ | |
if let title = action.title, let url = NSURL(string: "https://" + title) { |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import urllib2 | |
from pyquery import PyQuery as pq | |
def get_matome_info(url): | |
res = urllib2.urlopen(url) | |
html = res.read().decode('utf-8') |
OlderNewer