Skip to content

Instantly share code, notes, and snippets.

View k4200's full-sized avatar

Kazuo Kashima k4200

View GitHub Profile
# 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 / 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
}
@k4200
k4200 / hamamatsu-rb-58.rb
Created November 11, 2015 11:12
hamamatsu.rb #58 のお題を解いた(Ruby)
# http://jukensansu.cocolog-nifty.com/planet/2015/11/post-0b4b.html
# 総当りで
# Rubyはあまり得意でない
def array_to_digit(ary)
return ary[0] * 100 + ary[1] * 10 + ary[2]
end
def calc_sum(ary)
return array_to_digit(ary[0, 3]) + array_to_digit(ary[2, 3]) + array_to_digit(ary[4, 3]) + array_to_digit(ary[6, 2] + ary[0, 1])
@k4200
k4200 / pre-commit
Created July 17, 2015 14:32
pre-commit that executes php-cs-fixer for the committed files
#!/bin/bash
# Based on this gist https://gist.github.com/mardix/3623562
while read -r file;
do
if [[ $file = *.php ]];
then
php-cs-fixer fix "$file" --fixers=-phpdoc_params,-psr0,-visibility
git add "$file"
fi
@k4200
k4200 / traversetree.scala
Last active August 29, 2015 14:19
再帰を使って木構造をたどる
// 頭が慣れていないので、再帰むずい
case class Tree(id: Int, children: List[Tree])
val n8 = Tree(8, Nil)
val n4 = Tree(4, Nil)
val n5 = Tree(5, Nil)
val n6 = Tree(6, List(n8))
val n7 = Tree(7, Nil)
val n2 = Tree(2, List(n4, n5))
val n3 = Tree(3, List(n6, n7))
val n1 = Tree(1, List(n2, n3))
@k4200
k4200 / gist:c26ba194c9ff6e1343e7
Created September 22, 2014 02:07
コンパイルが通らない
abstract class C
case class C1() extends C
case class C2() extends C
trait Service[T <: C] {
def getFoo(): Option[T]
}
object Service {
// found : List[Option[Any]]