Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
json=$(curl -s "https://api.github.com/repos/Implem/Implem.Pleasanter/releases/latest")
URL=$(echo $json | jq -r '.assets[] | .browser_download_url')
name=$(echo $json | jq -r '.assets[] | .name')
tag_name=$(echo $json | jq -r '.tag_name')
base_path=`readlink ./pleasanter`
wget $URL
unzip $name -d $tag_name
diff -u -r $tag_name/pleasanter/Implem.Pleasanter/App_Data/Parameters/ $base_path/Implem.Pleasanter/App_Data/Parameters/> patch
@tatsuyaueda
tatsuyaueda / script.js
Created October 1, 2020 10:18
redmine_wysiwyg_editorで「このページを離れる前に保存しますか?」を表示するスクリプト
// path pattern:/issues/.*$
window.addEventListener('beforeunload', (event) => {
// redmine_wysiwyg_editor is Dirty
var mce = tinymce.get('mce_0');
if(mce && mce.isDirty()){
event.preventDefault();
event.returnValue = '';
}
});
@tatsuyaueda
tatsuyaueda / nut-template.xml
Created June 28, 2020 12:27
Template Network UPS Tools (NUT)(Zabbix)
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>4.0</version>
<date>2020-06-27T23:51:48Z</date>
<groups>
<group>
<name>UPS</name>
</group>
</groups>
<templates>
@tatsuyaueda
tatsuyaueda / mattermost.sh
Created November 5, 2018 01:48
ZABBIX Trigger -> Mattermost
#!/bin/sh
# Mattermost incoming web-hook URL and user name
url='https://mattermost.example.com/hooks/xxxxxxxxxx'
username='ZABBIX'
icon='https://jujucharms.com/_icon/120/zabbix-frontend.png'
## Values received by this script:
# To = $1 (Mattermost channel or user to send the message to, specified in the Zabbix web interface; "@username" or "#channel")
# Subject = $2 (usually either PROBLEM or RECOVERY)
@tatsuyaueda
tatsuyaueda / gist:9f1e560eb5530bd20f7eecf5e26b1e21
Last active February 25, 2019 06:44
AXIS M1124 to YouTube Live on RasPi3
- カメラからのストリームをそのまま流せば、RasPi3で流しても、CPU負荷は10%程度
- オーディオストリームがないとYouTubeはダメっぽい。
KEY="keykeykey"
SOURCE="rtsp://192.168.xx.xx:554/axis-media/media.amp"
ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp \
-i $SOURCE -pix_fmt + \
-c:v copy -acodec libmp3lame -ar 44100 -strict experimental -f flv \
"rtmp://a.rtmp.youtube.com/live2/$KEY"
@tatsuyaueda
tatsuyaueda / keycloak
Created August 8, 2018 01:49
FreeBSD Keycloak Startup Script
#!/bin/sh
#
# PROVIDE: keycloak
# REQUIRE: LOGIN DAEMON NETWORKING
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local to enable the Keycloak:
#
# keycloak_enable="YES"
# keycloak_path="/root/keycloak-4.2.1.Final/bin/standalone.sh"
### Keybase proof
I hereby claim:
* I am tatsuyaueda on github.
* I am tatsuyaueda (https://keybase.io/tatsuyaueda) on keybase.
* I have a public key whose fingerprint is C2CF ED6F 04DF 520B 1CB8 A788 4C46 4324 62CB 40CE
To claim this, I am signing this object:
@tatsuyaueda
tatsuyaueda / patch
Created October 9, 2017 13:57
OrkAudio Patch
diff -cr oreka-svn.orig/orkaudio/audiocaptureplugins/voip/VoIpSession.cpp oreka-svn/orkaudio/audiocaptureplugins/voip/VoIpSession.cpp
*** oreka-svn.orig/orkaudio/audiocaptureplugins/voip/VoIpSession.cpp 2017-10-09 13:49:42.243212033 +0000
--- oreka-svn/orkaudio/audiocaptureplugins/voip/VoIpSession.cpp 2017-10-09 13:51:21.793068023 +0000
***************
*** 24,29 ****
--- 24,30 ----
#include "ace/OS_NS_arpa_inet.h"
#include "MemUtils.h"
#include <boost/algorithm/string/predicate.hpp>
+ #include <cmath>
@tatsuyaueda
tatsuyaueda / QNAP.json
Created September 27, 2017 07:42
Graylog QNAP NAS ContentPack
{
"id":null,
"name":"QNAP NAS",
"description":"QNAP NAS",
"category":"QNAP NAS",
"inputs":[
{
"title":"QNAP NAS Syslog UDP",
"configuration":{
"override_source":"",
@tatsuyaueda
tatsuyaueda / snmp_trap_template.xml
Created September 21, 2017 03:40
ZABBIX3 SNMP Trap Template
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>3.0</version>
<date>2017-09-21T03:40:17Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>