Skip to content

Instantly share code, notes, and snippets.

View ykurniawan's full-sized avatar

Yitro Kurniawan ykurniawan

  • Jakarta, Indonesia
View GitHub Profile
@ykurniawan
ykurniawan / lambda-proxy-integration.yml
Created September 17, 2020 07:36 — forked from balintsera/lambda-proxy-integration.yml
Lambda Proxy Integration with Cloudformation tamplate
apiGateway:
Type: "AWS::ApiGateway::RestApi"
Properties:
Name: "example-api-gw"
Description: "Example API"
ProxyResource:
Type: "AWS::ApiGateway::Resource"
Properties:
ParentId: !GetAtt apiGateway.RootResourceId
@ykurniawan
ykurniawan / BooleanJsonConverter.cs
Created October 15, 2018 01:38 — forked from randyburden/BooleanJsonConverter.cs
A Json.NET JsonConverter that can handle converting the following values into boolean values: true, false, yes, no, y, n, 1, 0.
using System;
using Newtonsoft.Json;
namespace JsonConverters
{
/// <summary>
/// Handles converting JSON string values into a C# boolean data type.
/// </summary>
public class BooleanJsonConverter : JsonConverter
{
@ykurniawan
ykurniawan / androidVersionNumberUpdate.ps1
Created October 2, 2018 00:45 — forked from haythamnikolaidis/androidVersionNumberUpdate.ps1
Powershell Script to Update Android Version Code during VSTS Build
$ManifestFile = Get-ChildItem -Path $Env:BUILD_SOURCESDIRECTORY -Filter AndroidManifest.xml -Recurse
$fileXml = [xml] (Get-Content $ManifestFile.FullName )
$xpath = "//manifest"
Select-Xml -xml $fileXml -XPath $xpath | %{
$_.Node.SetAttribute("android:versionName", "1.0.0.$Env:BUILD_BUILDNUMBER")
$_.Node.SetAttribute("android:versionCode", $Env:BUILD_BUILDNUMBER)
}
$fileXml.Save($ManifestFile)
Get-Content $ManifestFile
@ykurniawan
ykurniawan / UpdateBuildVersion.ps1
Created October 2, 2018 00:24
Powershell script to Update Build & Version numbers for iOS & Android (Info.plist and AndroidManifest.xml )
$majorMinorVersion = ""
$commitCount = & git rev-list --count HEAD
Write-Output "git rev-list --count HEAD = $commitCount"
$params = @{
FilePath = ""
OS = ""
ToolsDir = ""
SolutionFolder = ""
@ykurniawan
ykurniawan / increase-build-number.sh
Created October 2, 2018 00:10 — forked from janten/increase-build-number.sh
Bash script for Xcode. Updates build number automatically and saves some useful information (e.g. current git commit) about the build environment to Info.plist.
#!/bin/bash
# increase-build-number.sh
# @desc Auto-increment the build number every time the project is run and add build information to plist
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
@ykurniawan
ykurniawan / xamarinandroidbindings.md
Created September 5, 2018 01:05 — forked from JonDouglas/xamarinandroidbindings.md
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

@ykurniawan
ykurniawan / RepeaterView.cs
Created August 13, 2018 05:21
Repeater View
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using Xamarin.Forms;
public delegate void RepeaterViewItemAddedEventHandler(object sender, RepeaterViewItemAddedEventArgs args);
/// <summary>
@ykurniawan
ykurniawan / jpos.xml
Created March 10, 2016 08:06
Sample of jpos.xml which containing a number of printer types. In this file there are only Bixolon printers
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE JposEntries PUBLIC "-//JavaPOS//DTD//EN"
"jpos/res/jcl.dtd">
<JposEntries>
<JposEntry logicalName="SPP-R210" >
<creation
factoryClass="com.bxl.loader.ServiceInstanceFactory"
serviceClass="com.bxl.services.posprinter.POSPrinterService" />
@ykurniawan
ykurniawan / MainActivity.java
Last active March 10, 2016 08:02
This is where you need to bootstrap Bixolon plugin
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Runtime.Serialization;
using System.Threading.Tasks;
using System.Web;