Skip to content

Instantly share code, notes, and snippets.

View nimzo6689's full-sized avatar

nimzo6689 nimzo6689

View GitHub Profile
@nimzo6689
nimzo6689 / Config.txt
Created May 7, 2017 21:10
Clipboard Historyの設定ファイル
;===========================定型文メニュー1===========================
;※定型文メニュー1のホットキー割り当ては設定画面から変更されます
;テンプレートとなっていますので、カスタマイズしてお使いください。詳細は Help.html の【定型文の編集】をご覧ください
;■で始まる項目は、選択されているテキスト(非選択時はクリップボードの文字列)に対して実行する項目です
@NoteHotkey=Shift,400
+個人情報(&P)
〒123-4567 OOO県OOO市OOO町OOO
末尾にタブ `
メールアドレス(&M)... | xxx@xx.xxx.or.jp
@nimzo6689
nimzo6689 / Vagrantfile
Created May 7, 2017 22:28
Vagrant + CentOS7 + MySQLのプロビジョニング(Bash)
Vagrant.configure("2") do |config|
config.vm.box = "bento/centos-7.3"
config.vm.network "private_network", ip: "192.168.33.12"
######################################
script = <<SCRIPT
yum -y remove mariadb-libs
rm -rf /var/lib/mysql
@nimzo6689
nimzo6689 / Linux-curation.html
Created June 5, 2017 12:32
業務でLinuxの知識がガチで必要になった人が見るべきWebサイト・ページについてまとめたものです。
<!DOCTYPE html>
<html>
<head>
<title>Curation for Linux</title>
<basefont face="メイリオ" size="2" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="exporter-version" content="Evernote Windows/304720 (ja-JP, DDL); Windows/10.0.14393 (Win64);" />
<style>
body,
@nimzo6689
nimzo6689 / ArrayListBenchmark.java
Created June 8, 2017 10:54
JMH - ArrayListに初期値によるパフォーマンス調査
package com.qiita.nimzo6689.bench;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
import lombok.SneakyThrows;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
@nimzo6689
nimzo6689 / ConvertTo-NumberRuby.ps1
Last active December 9, 2018 10:03
数字の読み方を返すプログラム
function ConvertTo-NumberRuby {
[CmdletBinding()]
param(
[Parameter(
Mandatory = $True,
ValueFromPipeline = $True,
ValueFromPipelineByPropertyName = $True
)]
[string[]]$Sources
)
@nimzo6689
nimzo6689 / reading_numerical_value_plpg.sql
Last active September 19, 2018 11:51
数字の読み方を返すプログラム(PostgreSQL - PL/pgSQL)
-- ※PL/pgSQLです。
CREATE OR REPLACE FUNCTION numerical_to_reading(numerical_value integer) RETURNS varchar AS $$
DECLARE
numerical_char CONSTANT varchar := abs(numerical_value)::varchar;
numerical_length CONSTANT integer := char_length(numerical_char);
digit integer;
currval integer;
ret varchar := '';
BEGIN
@nimzo6689
nimzo6689 / BetterConditionals.Tests.ps1
Created October 6, 2018 05:58
Qiita用「PowerShellでもっといい条件文の書き方5選」
Set-StrictMode -Version 2.0
##### 1. 包含演算子で論理演算子の数を減らす ###################
function Test01_Bad($fruit) {
# リンゴ、イチゴ、サクランボであれば赤と判定する。
if ($fruit -eq 'リンゴ' -or $fruit -eq 'イチゴ' -or $fruit -eq 'サクランボ') {
return '赤'
}
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# マウント失敗する場合、vbgeustかyum -y upgradeを行うこと。
config.vm.box = "geerlingguy/centos7"
config.vm.box_check_update = false
@nimzo6689
nimzo6689 / sonarqube_xpath.js
Created December 9, 2018 10:07
日常で書いたXPath式をとにかく保存しまくるページ
Array.from($x('//*[@id="root"]/div/div/nav/ul/li/a[./h3[contains(text(), "conditional")]]/@href'))
.map(e => `${e.textContent}, title: ${e.ownerElement.textContent}`)
@nimzo6689
nimzo6689 / setup.ps1
Last active January 4, 2019 08:12
PowerShellでGoogleAppsScriptの環境構築する方法
# Scoopの環境構築
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
scoop install git
# CUIツールをインストール
scoop install nodejs-lts yarn
# GUIツールをインストール
scoop bucket add extras