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
const projectId = "your-project-id"; | |
const location = "asia-east1"; | |
const {TranscoderServiceClient} = require("@google-cloud/video-transcoder").v1; | |
const client = new TranscoderServiceClient(); | |
/** | |
* calcOffsetNanoSec | |
* @param {number} offsetValueFractionalSecs input | |
* @return {number} |
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
#!/bin/sh | |
CURRENT_DIR=$(pwd) | |
sh ${CURRENT_DIR}/SwiftFormat.sh |
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
#!/bin/sh | |
git diff --name-only --diff-filter=d --cached "*.swift" | xargs -I {} swiftformat {} | |
git diff --name-only --diff-filter=d --cached | xargs -I {} git add {} |
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
#!/bin/sh | |
function help() { | |
cat <<EOF | |
$(basename ${0}) is a tool for upload dsyms for Firebase Crashlytics | |
Usage: | |
$(basename ${0}) [dsyms/ path] [Google-Service.plist path] | |
e.g. | |
$(basename ${0}) "/path/to/dsyms" "/Path/To/GoogleService_info.plist" | |
EOF |
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
import Foundation | |
import StoreKit | |
// helper | |
struct IAPHelper { | |
static var canMakePayments: Bool { | |
SKPaymentQueue.canMakePayments() | |
} | |
static func formattedPrice(with product: SKProduct) -> String? { |
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
function main() { | |
const calendarId = "YOUR_GMAIL_ADDRESS"; | |
const calendar = CalendarApp.getCalendarById(calendarId); | |
const now = new Date(); | |
const weekday = now.getDay(); | |
const events = calendar.getEventsForDay(now); | |
var horidayCalendar = CalendarApp.getCalendarById('ja.japanese#[email protected]'); | |
if (horidayCalendar.getEventsForDay(now, {max: 1}).length > 0) { | |
return; |
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
function doGet() { | |
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
const sheet = spreadsheet.getActiveSheet(); | |
const range = sheet.getRange("A2"); | |
const value = ('000000' + range.getValue()).slice(-6); | |
const out = ContentService.createTextOutput(); | |
out.setMimeType(ContentService.MimeType.JSON); | |
out.setContent(JSON.stringify({"code": value})); | |
return out; | |
} |
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
--- | |
format_version: '6' | |
default_step_lib_source: 'https://github.com/bitrise-io/bitrise-steplib.git' | |
project_type: fastlane | |
app: | |
envs: | |
- BITRISE_PROJECT_PATH: App.xcodeproj | |
- BITRISE_SCHEME: App | |
- BITRISE_EXPORT_METHOD: development | |
workflows: |
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
require "net/http" | |
require "uri" | |
require "pty" | |
require "expect" | |
require "fastlane" | |
require "spaceship" | |
require "json" | |
require 'zip' | |
fastlane_version "2.174.0" |
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
import UIKit | |
import PlaygroundSupport | |
protocol WaterfallLayoutDelegate: AnyObject { | |
func numberOfColumns() -> Int | |
func columnsSize(at indexPath: IndexPath) -> CGSize | |
func columnSpace() -> CGFloat | |
} | |
final class WaterfallLayoutViewController: UIViewController, UICollectionViewDataSource { |
NewerOlder