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
extension String { | |
func capitalizingFirstLetter() -> String { | |
return prefix(1).capitalized + dropFirst() | |
} | |
func getCamelCasedString () -> String { | |
var camelCasedStringCollection = [String]() | |
let stringComponents = components(separatedBy: " ") | |
for var oneComponent in stringComponents { | |
oneComponent = oneComponent.capitalizingFirstLetter() | |
camelCasedStringCollection.append(oneComponent) |
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
do { | |
let jsonData = try JSONEncoder().encode(myObjectHere) | |
let json = String(data: jsonData, encoding: .utf8) | |
print(json!) | |
} | |
catch { | |
print(error) | |
} |
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
# | |
# Swift SonarQube Plugin - Enables analysis of Swift and Objective-C projects into SonarQube. | |
# Copyright © 2015 Backelite (${email}) | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Lesser General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
# This file contains the fastlane.tools configuration | |
# You can find the documentation at https://docs.fastlane.tools | |
default_platform(:ios) | |
platform :ios do | |
desc "Description of what the lane does" | |
lane :metrics do | |
scan(scheme: "testSonar", |
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
// GIF creation | |
ffmpeg -ss 00:00:03.000 -i SpendTogether.mp4 -pix_fmt rgb24 -r 10 -s 440x960 -t 00:00:8.000 SpendTogether4.gif | |
ffmpeg -ss 00:00:10.000 -i Expressions.mp4 -pix_fmt rgb24 -r 10 -s 524x1080 -t 00:00:12.000 Expressions1.gif | |
// For optimization | |
convert -layers Optimize SpendTogether2.gif output_optimized.gif | |
// Installation of Tools | |
brew install ffmpeg | |
brew install imagemagick |
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
for family: String in UIFont.familyNames | |
{ | |
print(family) | |
for names: String in UIFont.fontNames(forFamilyName: family) | |
{ | |
print("== \(names)") | |
} | |
} |
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
// lambda.ts | |
import { Handler, Context } from 'aws-lambda'; | |
import { Server } from 'http'; | |
import { createServer, proxy } from 'aws-serverless-express'; | |
import { eventContext } from 'aws-serverless-express/middleware'; | |
import { NestFactory } from '@nestjs/core'; | |
import { ExpressAdapter } from '@nestjs/platform-express'; | |
import { AppModule } from './app.module'; |
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
service: | |
name: nest-serverless-lambda-demo | |
plugins: | |
- 'serverless-plugin-typescript' | |
- serverless-plugin-optimize | |
- serverless-offline | |
provider: | |
name: aws |
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 { Controller, Get, HttpException, Query } from '@nestjs/common'; | |
import { AppService } from './app.service'; | |
import { StudentService } from './student/student.service'; | |
@Controller('student') | |
export class AppController { | |
constructor( | |
private readonly appService: AppService, | |
private readonly studentService: StudentService, | |
) {} |
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 { HttpException, Injectable } from '@nestjs/common'; | |
import { ApiService } from '../api/api.service'; | |
export interface Student { | |
name: string; | |
grades: number[]; | |
} | |
@Injectable() | |
export class StudentService { |