Skip to content

Instantly share code, notes, and snippets.

View h1romas4's full-sized avatar
🍕
< Pizza Time

hiromasa h1romas4

🍕
< Pizza Time
View GitHub Profile
@h1romas4
h1romas4 / build.gradle
Last active August 3, 2017 07:43
Groovy + SpringBoot +Thymeleaf + Doma2 + H2 の build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.6.RELEASE")
}
}
apply plugin: 'groovy'
<!-- -Dlogback.configurationFile=./conf/logback-debug.xml -->
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{16} %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/sample.log</file>
@h1romas4
h1romas4 / vue-sample-multiple-selectbox.html
Last active January 27, 2017 01:20
2 multiple selectbox & transition-group
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style type="text/css">
.box-anime-move {
transition: transform 0.2s;
@h1romas4
h1romas4 / command.groovy
Created February 24, 2017 03:20
コマンドを実行し、標準・エラー出力を行いながらリターンコードを取得
def builder = new ProcessBuilder("ls -laF".split("[\\s]+"))
def process = builder.redirectErrorStream(true).start()
process.inputStream.eachLine { println it }
process.waitFor()
println process.exitValue()
@h1romas4
h1romas4 / remote.ps1
Last active October 7, 2019 10:15
PowerShell を使ったリモートサーバー操作
#
# プレーンな user/password 文字列からの認証情報をつくる
#
$username = "DOMAIN\username"
$secure = ConvertTo-SecureString "xxxxxxxx" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PsCredential($username, $secure)
#
# Enter-PSSession 相手のサーバーに対話式でログインしたい場合 (exit で抜けます)
#
@h1romas4
h1romas4 / command.ps1
Last active June 26, 2017 07:02
PowerShell から .bat ファイルを管理者ユーザで実行し標準出力とリターンコードを取得
$command = "dir C:\Windows\System32"
$info = New-Object System.Diagnostics.ProcessStartInfo
$info.FileName = [System.Environment]::GetEnvironmentVariable("ComSpec")
$info.Arguments = "/c " + $command
$info.UseShellExecute = $false
$info.RedirectStandardOutput = $true
$info.CreateNoWindow = $true
$info.Verb ="RunAs"
@h1romas4
h1romas4 / userContent.css
Last active July 23, 2017 05:39
Firefox フォント置換 userContent.css
@charset "utf-8";
@font-face {
font-family: Arial;
src: local("ヒラギノ角ゴ ProN");
}
@font-face {
font-family: Osaka;
src: local("ヒラギノ角ゴ ProN");
@h1romas4
h1romas4 / c_cpp_properties.json
Last active November 5, 2017 07:51
vscode-arduino の include パス設定
{
"configurations": [
{
"name": "Win32",
"includePath": [
"C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino",
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\avr\\include",
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\lib\\gcc\\avr\\4.9.2\\include",
"C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard",
"C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\libraries"
@h1romas4
h1romas4 / .editorconfig
Created July 24, 2017 13:02
一般的な .editorconfig
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@h1romas4
h1romas4 / get_vscode_vsix.ps1
Last active August 18, 2017 02:42
VSCode の拡張をオフラインインストール用に .vsix ファイルでダウンロードする (require Internet Explorer)
#
# Download VScode extention .vsix
# https://code.visualstudio.com/docs/editor/extension-gallery#_common-questions
#
Param($extention_site = "https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell")
$ErrorActionPreference = "stop"
# setting extention site
$res = Invoke-WebRequest -Uri $extention_site