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
@echo off | |
set P=%0 | |
ruby -S -x %P:\=/% %* | |
goto end | |
#! ruby | |
# -*- coding: Windows-31J -*- | |
$stdout.set_encoding('UTF-8', 'Windows-31J') | |
$stderr.set_encoding('UTF-8', 'Windows-31J') | |
puts "てすと" | |
__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
SELECT concat(User, '@', Host) User, Password FROM mysql.user order by host, user; | |
SELECT * FROM information_schema.schema_privileges order by table_schema, grantee, privilege_type; | |
SELECT * FROM information_schema.table_privileges order by table_schema, grantee, table_name, privilege_type; |
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 | |
# | |
# chkconfig: - 80 20 | |
# description: tomcat | |
# merged scripts on following pages: | |
# http://www.atmarkit.co.jp/ait/articles/0710/11/news121_2.html | |
# http://d.hatena.ne.jp/marmotte/20110910/1315660564 | |
# Source function library. |
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 firefoxtest; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebDriverCommandProcessor; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.firefox.FirefoxDriver; | |
public class FirefoxTest { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head profile="http://selenium-ide.openqa.org/profiles/test-case"> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<link rel="selenium.base" href="http://localhost" /> | |
<title>popup</title> | |
</head> | |
<body> | |
<table cellpadding="1" cellspacing="1" border="1"> |
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
require 'win32ole' | |
# 参考 | |
# - Using Automation to Send a Microsoft Outlook Message | |
# https://support.microsoft.com/en-us/kb/161088 | |
# - Office の開発 > Office クライアント > Outlook | |
# https://msdn.microsoft.com/ja-jp/library/office/fp161224.aspx | |
outlook = WIN32OLE.connect("Outlook.Application") | |
mail = outlook.CreateItem(0) |
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
<module name="SuppressWarningsHolder"> | |
<property name="aliasList" value="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck=javadoc,com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTypeCheck=javadoc,com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck=javadoc"/> | |
</module> |
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/bash | |
ruby=$(which ruby) | |
shebang="" | |
if [ "$ruby" != "/usr/bin/ruby" ]; then | |
shebang="--shebang=$ruby" | |
fi | |
set -x | |
bundle install --binstubs=vendor/bin --path=vendor/bundle $shebang |
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
#!/usr/bin/ruby | |
require 'csv' | |
### Anothor implementation: | |
# Encoding.default_internal = Encoding::UTF_8 | |
# CSV.foreach(filename, encoding: Encoding::CP932) do |row| ... | |
CSV.foreach(filename, encoding: "CP932:UTF-8") do |row| | |
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
#!/usr/bin/ruby | |
require 'csv' | |
BOM = "\u{FEFF}" | |
CSV.open(filename, "w", encoding: Encoding::UTF_8) do |csv| | |
csv << [ BOM + header1, header2, ... ] | |
csv << [ cell1_1, cell1_2, ... ] | |
end |