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
<h1>wordpressから取りたい</h1> | |
マークダウンで書きたい。 | |
どや。 |
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
package com.naosim; | |
import com.sun.tools.javac.util.Pair; | |
import java.lang.reflect.Method; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
public class Main { |
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
// copy from http://kihon-no-ki.com/javascript-count-multi-byte-characters-as-two-single-byte-one | |
var charcount = function (str) { | |
len = 0; | |
str = escape(str); | |
for (i=0;i<str.length;i++,len++) { | |
if (str.charAt(i) == "%") { | |
if (str.charAt(++i) == "u") { | |
i += 3; | |
len++; | |
} |
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
[ | |
"IoT", | |
"REST", | |
"Tomcat", | |
"apache", | |
"Line bot", | |
"linuxコマンド", | |
"scala", | |
"shell", | |
"Docker", |
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
$ruby_file_list = `find -name "**.rb"`.split("\n") | |
def requiree(filename) | |
result_list = $ruby_file_list.select {|line| line.include?(filename)} | |
if result_list.length == 0 then | |
throw "file not found: #{filename}", 1 | |
end | |
require(result_list[0]) | |
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
// カレンダーを表示する | |
(function() { | |
var url = 'http://google.com'; | |
var width = 1000; | |
var height = 400; | |
var casper = require('casper').create(); | |
casper.start(url); | |
casper.viewport(width, height); |
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
#!/bin/sh | |
cd `dirname $0` | |
PHANTOMJS_EXECUTABLE=node_modules/phantomjs/bin/phantomjs node_modules/casperjs/bin/casperjs index.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
<!DOCTYPE html> | |
<audio id="audio" src="getwild.mp4" controls> | |
<script> | |
var isPlaying = false; | |
window.addEventListener('devicelight', function(event) { | |
console.log(event.value + 'lux'); | |
if(isPlaying) { | |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>メニューテキストメーカー</title> | |
<style> | |
@import url(https://fonts.googleapis.com/css?family=Lobster); | |
html, body, h2 { | |
padding: 0px; |
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
from readutil import * | |
inputData = readInput([ | |
InputData('name'), | |
InputData('age', 'age(number)?') | |
]) |