Skip to content

Instantly share code, notes, and snippets.

@bright23
bright23 / replace.txt
Last active January 14, 2020 13:12
文字列置換
# 単一ファイルから
sed -i -e "s/置換したい文字列/置換後の文字列/g" [置換するファイル]
# プロジェクト全体から
ag -l 置換したい文字列 | xargs sed -i '' -e 's/置換したい文字列/置換後の文字列/g'
require 'fileutils'
# PDFディレクトリ内に入ってる.pdfを
# Icons.xcassetsに入れる
# 素材ファイルはuniversalでvector画像に設定
# $ProjectDir/Project/Assets/Icons.xcassets
Dir.glob('PDF/*.pdf') do | f |
# f = PDF/*.pdfになるので
file=f.split("/")
file_name=file[1]
# ==================== Emojis ====================
# 🎉 :tada: 初めてのコミット(Initial Commit)
# 🔖 :bookmark: バージョンタグ(Version Tag)
# ✨ :sparkles: 新機能(New Feature)
# 🐛 :bug: バグ修正(Bugfix)
# ♻️ :recycle: リファクタリング(Refactoring)
# 📚 :books: ドキュメント(Documentation)
# 🎨 :art: デザインUI/UX(Accessibility)
# 🐎 :horse: パフォーマンス(Performance)
# 🔧 :wrench: ツール(Tooling)
let a = "http://www.megasoft.co.jp"
let b = "https://shop.megasoft.co.jp/shop/"
let c = "http://www.google.co.jp/search?hl=ja&q=%U&lr="
let d = "amazon http://www.google.co.jp/search?hl=ja&q=%U&lr="
let e = "めちゃいい机 http://www.google.co.jp/search?hl=ja&q=%U&lr= #やすいよ #よいもんだよ"
let g = "めちゃいい机 http://www.google.co.jp/search?hl=ja&q=%U&lr= #やすいよ #よいもんだよ http://www.google.co.jp/search?hl=ja&q=%U&lr="
let u = "めちゃいい机 "