Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "pings",
"type": "array",
"items": {
"$ref": "#/definitions/ping"
},
"definitions": {
"ping": {
"id": "ping",
module Fastlane
module Actions
class BackupInfoPlistAction < Action
def self.run params
plist_path = params[:plist_path]
FileUtils.cp(plist_path, "#{plist_path}.back", {:preserve => true})
end
def self.details
'This action backup your "Info.plist".'
- name: Command Line Toolsが入っているかの確認
stat: path=/usr/include
register: command_line_tools_dir
- name: Command Line Toolsが入っていなかったらインストールする
shell: |
PLACEHOLDER=/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
touch $PLACEHOLDER
PROD=$(softwareupdate -l | grep "\*.*Command Line" | head -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n')
softwareupdate -i "${PROD}"
[[ -f $PLACEHOLDER ]] && rm $PLACEHOLDER
@gin0606
gin0606 / gist:c4f9aeb6ac852feed863
Created May 17, 2015 07:36
ブロック全解除するやつ
require "twitter"
client = Twitter::REST::Client.new do |config|
config.consumer_key = "consumer_key"
config.consumer_secret = "consumer_secret"
config.access_token = "access_token"
config.access_token_secret = "access_token_secret"
end
client.unblock client.blocked_ids.to_a
func install_vagrant_plugin(item) {
- command: vagrant plugin list | grep -E '^{{ item }}'
register: exist_vagrant_plugin
- shell: vagrant plugin install {{ item }}
when: not exist_vagrant_plugin
}
items.each {|item| install_vagrant_plugin(item) }
- stat: path=~/.bash_profile
register: bash_profile
- file: path=~/.bash_profile state=touch
when: not bash_profile.stat.exists
Vagrant.configure(2) do |config|
config.ssh.insert_key = false
config.vm.define :yosemite do |node|
node.vm.box = 'osx-yosemite'
node.vm.network :forwarded_port, guest: 22, host: 2001, id: "ssh"
node.vm.network :private_network, ip: "192.168.33.11"
node.vm.synced_folder ".", "/vagrant", type: "nfs", nfs: true
end
end
- hosts: vagrant
roles:
- role: base
vars:
rbenv:
global: 2.0.0-p481
ruby:
gems:
- bundler
homebrew:
@gin0606
gin0606 / main.yaml
Created May 2, 2015 13:19
roles/base/task/main.yaml
- name: Command Line Toolsが入っているかの確認
stat: path=/usr/include
register: command_line_tools_dir
- name: Command Line Toolsが入っていなかったらインストールする
shell: |
PLACEHOLDER=/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
touch $PLACEHOLDER
PROD=$(softwareupdate -l | grep "\*.*Command Line" | head -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n')
softwareupdate -i "${PROD}"
[[ -f $PLACEHOLDER ]] && rm $PLACEHOLDER
@gin0606
gin0606 / environment.rb
Created March 26, 2015 09:23
TravisCIでcocos2d-xのCI頑張ってた時の辛いスクリプト出てきた。
class Environment
def self.travis?
!!ENV['TRAVIS']
end
# PullRequestはbranch名の最後が`_android`で終わってたらAndroidビルドする
# PullRequestではない場合masterとadhocの時のみAndroidビルドする
def self.build_android?
return true unless travis?
return true if can_adhoc?