This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ------------------------------------------ | |
* MD5 function for GAS(GoogleAppsScript) | |
* | |
* You can get a MD5 hash value and even a 4digit short Hash value of a string. | |
* ------------------------------------------ | |
* Usage1: | |
* `=MD5("YourStringToHash")` | |
* or | |
* `=MD5( A1 )` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function fArray_merge($aOld, $aNew) | |
{ | |
if (is_array($aOld)) { | |
if (is_array($aNew)) { | |
foreach ($aNew as $sKey => $mValue) { | |
if (isset($aOld[$sKey]) && is_array($mValue) && is_array($aOld[$sKey])) { | |
$aOld[$sKey] = fArray_merge($aOld[$sKey], $mValue); | |
} else { | |
$aOld[$sKey] = $mValue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
「launcher Helperの問題レポート」 | |
「launcher Helperが予期しない理由で終了しました。」(Minecraft Launcher quit unexpectedly.) | |
----- | |
Process: launcher Helper [83464] | |
Path: /Applications/Minecraft.app/Contents/Frameworks/launcher Helper.app/Contents/MacOS/launcher Helper | |
Identifier: com.mojang.mclauncher.helper | |
Version: ??? | |
Code Type: X86-64 (Native) | |
Parent Process: launcher [83459] | |
Responsible: launcher Helper [83464] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bashの「ターミナル」対応 | |
# 作業ディレクトリ(ワーキング・ディレクトリ) | |
# | |
# ターミナルに現在の作業ディレクトリを、プロンプトごとに伝える | |
if [ -z "$INSIDE_EMACS" ]; then | |
update_terminal_cwd() { | |
# "file:"のURLスキームを使ってディレクトリを特定する。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns the check sum digit according to JAN code regulation. | |
* About JAN code : http://www.dsri.jp/jan/check_digit.html | |
* | |
* @param {string} $s number or string | |
* @return {integer} One digit number | |
*/ | |
function checkDigit( $s ){ | |
$a = array_merge( array(0), array_map( function($v){ return is_numeric( $v ) ? $v : bin2hex($v); }, str_split( $s ))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
mb_internal_encoding('UTF-8'); | |
include_once('mb_base_encode.php'); | |
// Input string | |
$s = 'This is a sample string to be hashed.'; | |
// Output | |
echo $s . PHP_EOL; // 'This is a sample string to be hashed.' | |
echo md5($s) . PHP_EOL; // 'baad33e1e97f316b9750c27c86bf64d6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* ========================================================================= | |
Sample usage | |
of | |
KEINOS_DB class | |
https://gist.github.com/KEINOS/873269390bc6c9c0cb724dd52170ea9f | |
========================================================================= */ | |
// Flag for debugging. Nothing important for the sample. See `debug_echo` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class compiler | |
' See sample work at | |
' https://paiza.io/projects/uoJ2-cB4Os76jMK-O11Csw | |
shared function Main as integer | |
' MD5ハッシュ値を計算したい文字列 | |
Dim s As String = "sample text" | |
' MD5の結果を表示 | |
Console.WriteLine ( md5( s ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mastodon@myserver live]$ export SECRET_KEY_BASE=$(bundle exec rake secret) | |
rake aborted! | |
NameError: uninitialized constant Annotate | |
/home/mastodon/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:53:in `block in load_missing_constant' | |
/home/mastodon/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:11:in `block in with_bootsnap_fallback' | |
/home/mastodon/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:17:in `without_bootsnap_cache' | |
/home/mastodon/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:11:in `rescue in with_bootsnap_fallback' | |
/home/mastodon/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/active_support.rb:6:in `with_bootsnap_fallback' | |
/home/mastodon/live/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.0.0/lib/bootsnap/load_path_cache/core_ext/ac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mastodon@myserver live]$ RAILS_ENV=production bundle exec rails db:setup | |
Database 'mastodon' already exists | |
rails aborted! | |
Devise.secret_key was not set. Please add the following to your Devise initializer: | |
config.secret_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
Please ensure you restarted your application after installing Devise or setting the key. | |
/home/mastodon/live/vendor/bundle/ruby/2.4.0/gems/devise-4.3.0/lib/devise/rails/routes.rb:498:in `raise_no_secret_key' | |
/home/mastodon/live/vendor/bundle/ruby/2.4.0/gems/devise-4.3.0/lib/devise/rails/routes.rb:226:in `devise_for' |