Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Hide danger buttons on AWS OpsWorks
// @namespace http://tampermonkey.net/
// @version 0.1
// @description OpsWorks の Start/StopAllInstances ボタンを隠す
// @author Kyohei Hamada
// @match https://console.aws.amazon.com/opsworks/home*
// @grant none
// ==/UserScript==
haman29
@haman29
haman29 / a.md
Last active June 16, 2022 20:25
ssh時にlocale周りでja_JP.UTF-8設定しようとしてwarningが出る問題の対処

エラー内容

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = "ja_JP.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
@haman29
haman29 / Gemfile
Created May 28, 2015 03:26
Ruboty使うためのGemfile
source "https://rubygems.org"
gem "rake"
gem 'foreman'
gem "ruboty-cron"
gem "ruboty-slack"
gem "ruboty-redis"
gem "ruboty-echo"
@haman29
haman29 / file1.txt
Created March 29, 2013 10:05
Newrelic sysmond と Newrelic php5 をインストールするシェルスクリプト的なもの ref: http://qiita.com/items/849926f63fc11c0a8a6f
# リポジトリ登録
$ rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
@haman29
haman29 / deploy-static-files-to-heroku
Created March 29, 2013 09:49
herokuで静的ファイルをホスティングする ref: http://qiita.com/items/08aa434dc5a7bf4f4cb5
# Login
$ heroku login
# Create Application (アプリ名は適当に付ける)
$ heroku create static-app-name
# Clone ruby config files
$ cd ~/repository/
$ git clone git://github.com/machida/kuroigamen-sandbox.git
<?php
/**
* 英数字のランダム文字列を生成する
*
* @param $size_of_random_string ランダム文字列のサイズ
*/
function generateRandomString($size_of_random_string = 8) {
// ランダム文字列に使用する文字
$char_list_str = array_merge(range('a', 'z'), range('0', '9'), range('A', 'Z'));
puts 'case1'
for n in [*1..50]
if n % (3 * 5) == 0
print 'fizzbuzz '
elsif n % 3 == 0
print 'fizz '
elsif n % 5 == 0
print 'buzz '
else
print "#{n} "