Skip to content

Instantly share code, notes, and snippets.

server {
listen 80;
server_name *.example.com>;
if ($host ~* "^([^.]+(\.[^.]+)*)\..example.com$"){
set $subd $1;
}
....
}
@Keishake
Keishake / create_dummy_image.rb
Last active August 29, 2015 14:08
ゲーム開発時のダミー画像を生成するスクリプト
#!/usr/bin/env ruby
require 'RMagick'
require "colorable"
require 'optparse'
include Colorable
def cmdline
args = {}
OptionParser.new do |parser|
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
// GFIconControllerの初期化
gfIconController = [[GFIconController alloc] init];
// アイコンの自動更新間隔を指定(デフォルトで30秒/最短10秒)
[gfIconController setRefreshTiming:30];
// アイコンの配置位置を設定(1個〜20個まで設置出来ます)
@Keishake
Keishake / gist:9799109
Last active August 29, 2015 13:57
Gyazo Ninja AA
?O&&O[
&&&&&&&&&&&&&&&&&&&&&&&&&m
&&&&&&&&&&&&&&&&&&&&&&&&&&&$$$
&&&&&&&&&&&&& &&&&&&&&&&&&&&$$
&&&&&&&&&&& i xO &&&&&&&&&&$. il
&&&&&&&&&&&&&& )&&&&&&&&&&&&&$ illl
&&&&&&&&&&&&&&& M&&&&&&&&&&&&&$ ll
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&% ++ll++
&&& @[ @ I&&& ++ll++
&&& I&&& ++ll++
/Users/keishake/Documents/nota/GyazoRails/app/models/image_file.rb:4: warning: already initialized constant ImageFile::TMP_DATA_PERIOD
/Users/keishake/Documents/nota/GyazoRails/app/models/image_file.rb:4: warning: previous definition of TMP_DATA_PERIOD was here
[rspec-sidekiq] WARNING! Sidekiq will *NOT* process jobs in this environment. See https://github.com/philostler/rspec-sidekiq/wiki/FAQ-&-Troubleshooting
/Users/keishake/Documents/nota/GyazoRails/vendor/bundle/ruby/2.1.0/gems/redis-3.0.7/lib/redis/connection/ruby.rb:129: [BUG] rb_sys_fail_str(connect(2) for [fe80::1%lo0]:6379) - errno == 0
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
#! /bin/bash
# you need install shenzhen
# `gem install shenzhen`
#
API_TOKEN="TESTFLIGHT_APITOKEN_HERE"
TEAM_TOKEN="TESTFLIGHT_TEAMTOKEN_HERE"
TEAM_NAME="TESTFLIGHT_TEAM_NAME"
HIPCHAT_TOKEN="HIPCHAT_API_TOKEN_HERE"
HIPCHAT_ROOM_ID="HIPCHAT_ROOM_ID_HERE"
ipa build -c Release && ipa distribute:testflight -a $API_TOKEN -T $TEAM_TOKEN -m "Manbo!!" --notify -l $TEAM_NAME
@Keishake
Keishake / string_ext.rb
Last active January 3, 2016 05:19
to_bool method
# put this file at config/initializers
module StringToBoolean
def to_bool
return true if self == true || self =~ (/^(true|t|yes|y|1)$/i)
return false if self == false || self.blank? || self =~ (/^(false|f|no|n|0)$/i)
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
end
class String; include StringToBoolean; end