Skip to content

Instantly share code, notes, and snippets.

@ponsuke0531
ponsuke0531 / file0.txt
Last active September 18, 2020 12:48
GlassFishとPayaraを使うときに参考になるサイト集 ref: https://qiita.com/ponsuke0531/items/6b3a909e057620e50c9c
# %PAYARA_HOME%/glassfish/bin/asadminにPATHが通っている場合
# 起動したい
$ asadmin start-domain
# 停止したい
$ asadmin stop-domain
# 再起動したい
$ asadmin restart-domain
@ponsuke0531
ponsuke0531 / file0.txt
Last active April 13, 2020 06:09
Ricty Diminishedフォントをいろいろなところに設定する方法 ref: https://qiita.com/ponsuke0531/items/db06599f92b234fbd062
# 単純にcloneする
$ git clone https://github.com/edihbrandon/RictyDiminished.git
Cloning into 'RictyDiminished'...
remote: Enumerating objects: 25, done.
remote: Total 25 (delta 0), reused 0 (delta 0), pack-reused 25
Unpacking objects: 100% (25/25), done.
# RictyDiminished配下にフォントファイルを取得できる
$ find RictyDiminished/ -type f -maxdepth 1
RictyDiminished/.uuid
@ponsuke0531
ponsuke0531 / slack_webhook.py
Last active January 6, 2019 03:35
はじめてのPythonでSlackとつながってみる
import json, requests
WEB_HOOK_URL = "https://hooks.slack.com/services/"
WEB_HOOK_URL += "WebhookURLの後半"
requests.post(WEB_HOOK_URL, data=json.dumps({
# channelでメッセージを送るチャネルが指定できます。
'channel': '#チャネル名',
'text': "<@メンション相手のメンバーID> メンションを送るには `<@メンバーID>` を指定する。",
'link_names': 1,
'username': 'usernameを指定すると投稿するユーザを変えられる。',
# -n "${line}" で最終行が空行でない場合にも対応する
cat {ファイル名} | while read line || [ -n "${line}" ]; do
# 1行($line)ずつ処理する
done
# Windows7
タブの切り替え : Ctrl + Tab
@ponsuke0531
ponsuke0531 / file0.txt
Last active September 18, 2020 12:28
WELD-000072: Bean declaring a passivating scope must be passivation capable.となってしまった時の対応方法 ref: https://qiita.com/ponsuke0531/items/0475a32bf599b6dab5fd
cannot Deploy アプリ名
deploy is failing=Error occurred during deployment: Exception while loading the app : CDI deployment failure:WELD-000072: Bean declaring a passivating scope must be passivation capable. Bean: Managed Bean [class secondSubmittedValue.PasswordBean] with qualifiers [@Default @Any @Named]. Please see server.log for more details.
@ponsuke0531
ponsuke0531 / file2.txt
Last active July 27, 2020 01:43
Eclipseの操作を教えてくれるサイト集 ref: https://qiita.com/ponsuke0531/items/3ee5d0ad3f3011b9c5b4
[パッケージ・エクスプローラー]で対象ソースを選択 > コンテキストメニュー > [ソース] : Alt + Shift + S > [GetterおよびSetterの生成]
無理してショートカット : ソース上で[Shift + Alt + S] > [R] > ダイアログで設定
@ponsuke0531
ponsuke0531 / NetworkManagerのコマンド
Last active August 1, 2020 07:20
CentOSに挑戦する初心者の助けになればいいと思うサイト集 ref: https://qiita.com/ponsuke0531/items/c6fff1452537ad3709e6
# 自動起動を設定する
$ chkconfig NetworkManager on
情報:'systemctl enable NetworkManager.service'へ転送しています。
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Authenticating as: userName
Password:
==== AUTHENTICATION COMPLETE ===
Created symlink from /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service to /usr/lib/systemd/system/NetworkManager.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/NetworkManager.service to /usr/lib/systemd/system/NetworkManager.service.
@ponsuke0531
ponsuke0531 / .gitconfig
Last active August 25, 2020 00:26
SourceTreeの使い方を紹介しているサイト集 ref: https://qiita.com/ponsuke0531/items/bba6a8c87317578f8018
; ドメインのパスワード変更したら変更する
[http]
proxy = http://{アカウント}:{パスワード}@{プロキシ}:{ポート}
[https]
proxy = http://{アカウント}:{パスワード}@{プロキシ}:{ポート}
@ponsuke0531
ponsuke0531 / bootstrap-select.js
Last active April 11, 2019 01:29
スクロールできるダイアログでbootstrap-selectを使ったらリストが画面からはみ出して選択できなくなった時の対応方法 ref: https://qiita.com/ponsuke0531/items/6e055428c33f7c644255
<省略>
setSize: function () {
<省略>
} else if (this.options.size && this.options.size != 'auto' && menu.find('li' + notDisabled).length > this.options.size) {
var optIndex = this.$lis.not('.divider' + notDisabled).find(' > *').slice(0, this.options.size).last().parent().index();
var divLength = this.$lis.slice(0, optIndex + 1).filter('.divider').length;
menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding;
if (that.options.dropupAuto) {
//noinspection JSUnusedAssignment
this.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && (menuHeight < menu.height()));