| 操作 | apt | dnf | pacman |
|---|---|---|---|
| パッケージ一覧更新 | sudo apt update |
sudo dnf check-update |
sudo pacman -Sy |
| パッケージインストール | sudo apt install PACKAGE |
sudo dnf install PACKAGE |
sudo pacman -S PACKAGE |
| パッケージ削除 | sudo apt remove PACKAGE |
sudo dnf remove PACKAGE |
sudo pacman -R PACKAGE |
| パッケージ検索 | apt search KEYWORD |
dnf search KEYWORD |
pacman -Ss KEYWORD |
| アップグレード | sudo apt upgrade |
sudo dnf upgrade |
sudo pacman -Syu |
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
| # https://stackoverflow.com/questions/6458990/how-to-format-a-number-1000-as-1-000 | |
| n = 1234567890 | |
| puts n.to_s.gsub(/(\d)(?=\d{3}+(?!\d))/, "\\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
| import javax.script.ScriptEngine; | |
| import javax.script.ScriptEngineManager; | |
| import javax.script.ScriptException; | |
| public class Main { | |
| public static void main(String[] args) throws ScriptException { | |
| ScriptEngineManager manager = new ScriptEngineManager(); | |
| ScriptEngine engine = manager.getEngineByName("js"); | |
| System.out.println(engine.toString()); |
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
| # https://unix.stackexchange.com/a/31955 | |
| sed -i -e '$a\' file |
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 |
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
| #!/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
| <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
| 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
| <?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"> |
NewerOlder