This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
To use: | |
1. Install [Ansible](https://www.ansible.com/) | |
2. Setup an Ubuntu 16.04 server accessible over ssh | |
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update social info | |
socialInfo = config["socials"] | |
fbId = "" | |
gmapId = "" | |
if socialInfo.kind_of?(Array) | |
socialInfo.each do |item| | |
if item["type"] == "google" | |
gmapId = item["gmap_id"] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update social info | |
socialInfo = config["socials"] | |
fbId = "" | |
schemes = [] | |
if socialInfo.kind_of?(Array) | |
socialInfo.each do |item| | |
if item["type"] == "google" | |
schemes << { | |
"role" => "Editor", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
localization = config["localization"] | |
localization.each do |loc| | |
if loc["iso"] == "en" | |
replaceFile( | |
"#{placeHolderPath}/Localized/en.lproj/Localizable.strings", | |
Base64.decode64(loc["content"]) | |
) | |
end | |
if loc["iso"] == "ja" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless dashIconDownloadUrl.empty? | |
tempfile = Down.download(dashIconDownloadUrl) | |
replaceFile( | |
"#{placeHolderPath}/Placeholder.xcassets/dash-logo.imageset/dash-logo.png", | |
tempfile.path | |
) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless iconDownloadUrl.empty? | |
tempfile = Down.download(iconDownloadUrl) | |
android_appicon( | |
appicon_image_file: tempfile.path, | |
appicon_icon_types: [:launcher, :notification], | |
appicon_path: Dir.pwd + "#{placeHolderPath}/res/mipmap", | |
generate_rounded: true, | |
) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless iconDownloadUrl.empty? | |
tempfile = Down.download(iconDownloadUrl) | |
appicon( | |
appicon_image_file: tempfile.path, | |
appicon_devices: [:iphone, :ios_marketing], | |
appicon_path: Dir.pwd + "#{placeHolderPath}/Placeholder.xcassets", | |
remove_alpha: true, | |
) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gradeFilePath = Dir.pwd + "/../app/build.gradle" | |
changeAppId(bundleId) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android_change_string_app_name( | |
newName: appName, | |
stringsFile: filePath, | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update_info_plist( | |
plist_path: "{your_plist_path}", | |
display_name: appName, | |
app_identifier: bundleId, | |
) |
NewerOlder