Skip to content

Instantly share code, notes, and snippets.

View ikuwow's full-sized avatar

Ikuo Degawa ikuwow

View GitHub Profile
@ikuwow
ikuwow / apache_spec.rb
Last active August 29, 2015 14:08
Chef+Kithcen環境でServerspecのテスト実行までの手順 ref: http://qiita.com/ikuwow/items/27397b9675bd50e87b73
require 'serverspec'
describe package('httpd24-httpd') do
it { should be_installed }
end
@ikuwow
ikuwow / SampleViewController.swift
Created December 6, 2014 05:14
Swift (iOS)で日本語変数名が便利だなと思った例 ref: http://qiita.com/ikuwow/items/924a039c168655f4fded
var alertController = UIAlertController(title: "あなたはシカオさんではありませんね?", message:"", preferredStyle: UIAlertControllerStyle.Alert)
let はいAlertAction = UIAlertAction(title: "はい", style: UIAlertActionStyle.Default, handler: {...(略)...})
let いいえAlertAction = UIAlertAction(title: "いいえ", style: UIAlertActionStyle.Cancel, handler: nil)
alertController.addAction(はいAlertAction)
alertController.addAction(いいえAlertAction)
self.presentViewController(alertController, animated: true, completion:nil)
@ikuwow
ikuwow / file0.txt
Last active August 29, 2015 14:14
serverspecのpackageリソースはrpmコマンドでテストをする ref: http://qiita.com/ikuwow/items/27b99b6540ee48afa988
$ tree spec/
spec/
├── default
│   └── sample_spec.rb
└── spec_helper.rb
@ikuwow
ikuwow / Gemfile
Last active August 29, 2015 14:15
Rails+Herokuで5分でWebアプリ作るおっ( ^ω^) ref: http://qiita.com/ikuwow/items/8b8aa9ac8990f98691a9
gem 'rails_12factor', group: :production
@ikuwow
ikuwow / file0.txt
Last active August 22, 2016 11:06
opensslコマンドで簡単なファイル暗号化 ref: http://qiita.com/ikuwow/items/1cdb057352c06fd3d727
$ openssl aes-256-cbc -e -in rawtext.txt -out encrypted.txt
enter aes-256-cbc encryption password: # パスワード入力
Verifying - enter aes-256-cbc encryption password: # もう一度
@ikuwow
ikuwow / file0.txt
Created March 15, 2015 09:13
'No backend type is specified. Fall back to :exec type.'が大量に出てくる場合の対処法 ref: http://qiita.com/ikuwow/items/abdce2b4118f07241bc8
$ kitchen verify
-----> Starting Kitchen (v1.3.1)
-----> Verifying <default-ubuntu-1410>...
Removing /tmp/busser/suites/serverspec
Uploading /tmp/busser/suites/serverspec/base_spec.rb (mode=0644)
-----> Running serverspec test suite
/opt/chef/embedded/bin/ruby -I/tmp/busser/suites/serverspec -I/tmp/busser/gems/gems/rspec-support-3.2.2/lib:/tmp/busser/gems/gems/rspec-core-3.2.2/lib /opt/chef/embedded/bin/rspec --pattern /tmp/busser/suites/serverspec/\*\*/\*_spec.rb --color --format documentation --default-path /tmp/busser/suites/serverspec
Command "getenforce"
stdout
ASK: [List Installed Vagrant Plugins] ****************************************
ok: [localhost]
TASK: [Install Vagrant Plugins] ***********************************************
skipping: [localhost] => (item=vagrant-omnibus)
skipping: [localhost] => (item=vagrant-vbguest)
skipping: [localhost] => (item=vagrant-cachier)
skipping: [localhost] => (item=vagrant-vbox-snapshot)
skipping: [localhost] => (item=vagrant-aws)
skipping: [localhost] => (item=vagrant-digitalocean)
@ikuwow
ikuwow / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ikuwow
ikuwow / file1.txt
Last active September 20, 2015 02:01
簡便なSafariとChromeのメモリ使用量の測定方法 ref: http://qiita.com/ikuwow/items/976166b30610f33f4643
$ sh safari_vs_chrome.sh &
@ikuwow
ikuwow / gist:911e9f9ec88d673c9671
Last active August 29, 2015 14:19
fizzbuzz_by_VBA
Sub fizzBuzz()
maxNumber = 100
Message = ""
For num = 1 To maxNumber
Message = Message & ", "