Create database
CREATE DATABASE SAMPLEDB;
Add Database User
GRANT ALL ON SAMPLEDB.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" |
var map; | |
window.initMap = function() { | |
var myLatLng = { | |
lat: <%= data.corp.latitude.value %>, | |
lng: <%= data.corp.longitude.value %> | |
}; | |
var mapOptions = { |
# coding: utf-8 | |
require 'rubygems' | |
require 'bundler/setup' | |
require 'redcarpet' | |
require 'pygments' | |
# マークダウンのファイル名をkey | |
# タイトルをvalueとしてセット | |
@names = { | |
index: "ホーム", |
require 'open-uri' | |
require 'nokogiri' | |
doc = Nokogiri::HTML(open('http://www.heartrails.com')) | |
doc.search('//td[@class="services_table"]').each do |s| | |
p '------------------------------' | |
p s.search('p').text | |
p s.search('a')[0].attributes["href"].value | |
end |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.brew.update</string> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> |
var f = this.getField("BestBeforeDate"); | |
var d = new Date(); | |
d.setYear(d.getFullYear() + 2); | |
f.value = util.printd("yyyy.m.d", d); |
// 気温 | |
var a = []; jQuery.each($('#tablefix1')[0].rows, function(i, val){ if(i > 3){a.push(parseFloat(val.cells[7].innerHTML));}}); console.log(a); | |
// 天気 | |
var a = []; jQuery.each($('#tablefix1')[0].rows, function(i, val){ if(i > 3){var s = val.cells[20].innerHTML[0]; var p; switch(s){ case "晴": case "快": p = 1; break; case "曇": p = 2; break; case "雨": case "雪": case "大": p = 3; break; default: p = 2;} a.push(p);}}); console.log(a); |
python -m SimpleHTTPServer 8888 & |
Create database
CREATE DATABASE SAMPLEDB;
Add Database User
GRANT ALL ON SAMPLEDB.* TO 'admin'@'localhost' IDENTIFIED BY 'password';
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Example</title> | |
<style> | |
@font-face { | |
font-family: 'Example Sans Serif'; | |
src: url(g.svg) format('svg'); | |
font-weight: normal; |