Skip to content

Instantly share code, notes, and snippets.

View k4200's full-sized avatar

Kazuo Kashima k4200

View GitHub Profile
@k4200
k4200 / fabfile.py
Last active November 28, 2021 10:31
fabfile.py for Play! framework 2.2 multi-project settings.
from fabric.api import local, env, run, roles, execute, put
from fabric.utils import abort
env.user = "playuser"
env.roledefs = {
'web': ['web.example.com'],
'batch': ['batch.example.com']
}
env.num_of_releases = 3
# dnf install mariadb-server
メタデータの期限切れの最終確認: 0:12:14 時間前の 2021年06月29日 04時15分22秒 に実施しました。
依存関係が解決しました。
==========================================================================================================================================================
パッケージ アーキテクチャー バージョン リポジトリー サイズ
==========================================================================================================================================================
インストール:
mariadb-server x86_64 3:10.3.28-1.module_el8.3.0+757+d382997d appstream 16 M
依存関係のインストール:
mariadb x86_64 3:10.3.28-1.module_el8.3.0+757+d382997d appstream 6.0 M
@k4200
k4200 / gist:e70c3db54eea859a6ab73dd5ad7ead7e
Created June 30, 2021 02:43
CentOS 7 -> 8 のログ: dracut-network
# dnf upgrade dracut-network --allowerasing --best
Extra Packages for Enterprise Linux 7 - x86_64 0.0 B/s | 0 B 00:00
CentOS Linux 8 - BaseOS 0.0 B/s | 0 B 00:00
依存関係が解決しました。
==========================================================================================================================================================
パッケージ アーキテクチャー バージョン リポジトリ サイズ
==========================================================================================================================================================
削除中:
dracut-network x86_64 033-572.el7 @System 146 k
依存関係パッケージを削除中:
@k4200
k4200 / gist:74f6838387d30128fb03de27937f99fc
Created June 30, 2021 02:09
CentOS 7 -> 8 で古いカーネルを削除しようとしたときにでた依存関係のエラー
# rpm -e `rpm -q kernel`
エラー: 依存性の欠如:
kernel >= 3.10.0-1133.el7 は (インストール済み)kmod-kvdo-6.1.3.23-5.el7.x86_64 に必要とされています
kernel(PDE_DATA) = 0x44f0d59d は (インストール済み)kmod-kvdo-6.1.3.23-5.el7.x86_64 に必要とされています
kernel(___ratelimit) = 0x155f4108 は (インストール済み)kmod-kvdo-6.1.3.23-5.el7.x86_64 に必要とされています
kernel(__bitmap_weight) = 0x4cbbd171 は (インストール済み)kmod-kvdo-6.1.3.23-5.el7.x86_64 に必要とされています
kernel(__cond_resched_lock) = 0xe2cfb038 は (インストール済み)kmod-kvdo-6.1.3.23-5.el7.x86_64 に必要とされています
kernel(__fentry__) = 0xbdfb6dbb は (インストール済み)kmod-kvdo-6.1.3.23-5.el7.x86_64 に必要とされています
kernel(__init_waitqueue_head) = 0xf432dd3d は (インストール済み)kmod-kvdo-6.1.3.23-5.el7.x86_64 に必要とされています
kernel(__kmalloc) = 0xd2b09ce5 は (インストール済み)kmod-kvdo-6.1.3.23-5.el7.x86_64 に必要とされています
@k4200
k4200 / set-aws-session-token.sh
Created November 24, 2020 02:22
Executes aws sts get-session-token, and sets the result to .aws/credentials
#!/bin/bash
# Based on the following shell script:
# https://github.com/DevNambi/utility-scripts/blob/master/sessioner.sh
#
echo $@
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
@k4200
k4200 / gist:588ac7070e80b0b5c28502b7eda45d11
Created July 31, 2019 02:12
nextcloud-desktop-log-20190731
[OCC::FolderMan::setupFolders Setup folders from settings file
[OCC::ConfigFile::setupDefaultExcludeFilePaths Adding user defined ignore list to csync: "/Users/johndoe/Library/Preferences/Nextcloud/sync-exclude.lst"
[OCC::FolderMan::addFolderInternal Adding folder to Folder Map OCC::Folder(0x7fe3d981cc00) "1"
[OCC::FolderMan::scheduleFolder Schedule folder "1" to sync!
[OCC::FolderMan::scheduleFolder Folder is not ready to sync, not scheduled!
[OCC::ownCloudGui::slotSyncStateChange Sync state changed for folder "https://example.com/remote.php/webdav/" : "Not yet Started"
[OCC::SyncJournalDb::checkConnect sqlite3 version "3.24.0"
[OCC::SyncJournalDb::checkConnect sqlite3 journal_mode= "wal"
[OCC::ClientProxy::setupQtProxyFromConfig Set proxy configuration to use the prefered system proxy for http tcp connections
[OCC::WebFlowCredentials::slotFinished request finished
@k4200
k4200 / gist:1192189
Created September 4, 2011 03:17
jQuery UI Autocomplete for Japanese IME
// jQuery UI doesn't work with Japanese, Chinese and probably other
// languages' IMEs.
//
// This code snippet is a modified code of jQuery UI Autocomplete 1.8.16
// that works with Japanese IME. It's based on the code in the ticket below.
// http://bugs.jqueryui.com/ticket/5933
//
// I briefly tested it, and it seems ok.
// Any comments/feedback would be appreciated.
//
@k4200
k4200 / .emacs
Last active December 20, 2015 17:39
.emacs PHP関連の設定もうちょっと充実させて、ちゃんとバージョン管理する。
(put 'upcase-region 'disabled nil)
(add-to-list 'load-path (expand-file-name "~/.emacs.d/elisp"))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/auto-install"))
;; key bindings
(global-set-key "\C-c\C-c" 'comment-or-uncomment-region)
(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
@k4200
k4200 / scraping-yql.html
Created April 3, 2013 05:31
Scrape a page by using YQL
<html>
<header>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/javascripts/jquery-1.6.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var url = "http://example.com/";
var query = 'select * from html where url="' + url + '" and xpath="*"';
@k4200
k4200 / hamamatsu-rb-58.scala
Created November 11, 2015 11:14
hamamatsu.rb #58 のお題を解いた(Scala)
// http://jukensansu.cocolog-nifty.com/planet/2015/11/post-0b4b.html
// parser combinators とか使えそうな気もするけど分からん
def arrayToDigit(ary: List[Int]): Int = {
ary(0) * 100 + ary(1) * 10 + ary(2)
}
def calcSum(ary: List[Int]): Int = {
List(ary.slice(0, 3), ary.slice(2, 5), ary.slice(4, 7), ary.slice(6, 8) :+ ary(0)).map(arrayToDigit).sum
}