Skip to content

Instantly share code, notes, and snippets.

View yunarta's full-sized avatar

Yunarta Kartawahyudi yunarta

  • Singtel
  • Singapore
View GitHub Profile
@yunarta
yunarta / http.py
Last active March 12, 2024 13:10
python code for using nexus as terraform state backend
def handle_state(method, path, body):
session = requests.sessions.Session()
session.auth = ('jenkins', 'jenkins')
if method == 'GET':
response = session.get(url=f"http://nxrm.funf/repository/storage-terraform-states{path}")
if response.status_code == 404:
return {
'statusCode': 200,
'body': {
class EnterpriseRepositoryPlugin implements Plugin<Gradle> {
void apply(Gradle gradle) {
println("EnterpriseRepositoryPlugin")
}
}
ext.applyEnterprisePlugin = { gradle ->
gradle.apply plugin: EnterpriseRepositoryPlugin
}
import java.util.logging.Level
apply plugin: "maven"
apply plugin: "maven-publish"
def publishOpts = [
"kotlin" : false,
"android" : "false",
"androidProject" : false,
"androidApplication": false,
//: Playground - noun: a place where people can play
import UIKit
import RxSwiftTest
import RxSwift
func api1() -> Observable<String> {
return Observable.create{ (subscriber) -> Disposable in
print("api1 called")
subscriber.onNext("api1 #1")
included:
- Gate-iOS/Gate-iOS
- SwiftVIPER/SwiftVIPER
disabled_rules:
- line_length
- identifier_name
- trailing_whitespace
- trailing_newline
- vertical_parameter_alignment
@yunarta
yunarta / Test.swift
Last active January 15, 2018 10:36
Generic and optional obj-c method
import Foundation
@objc protocol One: NSObjectProtocol {
@objc optional func method()
}
class NoGenericBase: NSObject, One { }
class NoGenericImpl: NoGenericBase {
func method() { print("second method") }
@yunarta
yunarta / Delegate.swift
Last active January 12, 2018 08:24
EndPoint
class EndPoint {
}
protocol API {
func login()
}
class APIVersionOne: API {
@yunarta
yunarta / Localize.podspec
Last active January 10, 2018 11:21
Re:Build
Pod::Spec.new do |s|
s.authors = "Re:Build"
s.homepage = "none"
s.summary = "Re:Build of Localize"
s.name = "Localize"
s.version = "1.5.2"
s.ios.deployment_target = '8.0'
s.source = { :path => "" }